BALTIMORE — Chris Sale struck out 13 to become the first AL pitcher in 18 years to reach the 300 mark, and the Boston Red Sox moved to the brink of clinching a playoff berth by beating the Baltimore Orioles 9-0 on Wednesday night.

Sale (17-7) reached the milestone on his last pitch, a called third strike against Ryan Flaherty to end the eighth inning. The last AL pitcher to fan 300 batters in a season was Boston’s Pedro Martinez in 1999, when he set a club record with 313.

Mookie Betts and Deven Marrero homered for the Red Sox, who hold a three-game lead over the second-place Yankees with 10 games left.

After winning two straight 11-inning games over the skidding Orioles, Boston jumped to a 6-0 lead in the fifth and coasted to its 11th win in 14 games.

Betts and Marrero hit two-run homers in the fourth against Wade Miley (8-14) and Hanley Ramirez added a two-run double in the fifth.

Sale allowed four hits and walked none in matching his career high for wins.

YANKEES 11, TWINS 3

NEW YORK — Aaron Judge hit his AL-leading 45th home run and topped 100 RBIs, Didi Gregorius surpassed Derek Jeter for the most home runs by a Yankees shortstop and New York beat Minnesota for a three-game sweep.

The game was briefly halted in the fifth inning when a foul ball down the third-base line off the bat of Todd Frazier struck a young girl, who was carried out of the stands, given first aid and taken to a hospital.

Frazier knelt down and covered his head, and many other Yankees and Twins watched in stunned silence as the fan was helped.

The Yankees, who have won 10 of 12, opened a seven-game advantage over the Twins for the top AL wild card with 10 games remaining.

The Twins have lost five of six and were outscored 18-6 in the three-game series.

Judge’s two-run homer down the right-field line came on an 0-2 pitch from Bartolo Colin (4-6 in the AL and 6-14 overall).

Chasen Shreve (4-1) pitched three hitless innings in relief of Luis Severino.

RAYS 8, CUBS 1

ST. PETERSBURG, Fla. — Blake Snell gave up two hits in seven shutout innings, and Tampa Bay ended Chicago’s season-best seven-game winning streak.

The Cubs, who had not lost since being swept by the Milwaukee Brewers in a three-game series in Chicago on Sept. 8-10, are scheduled to open a four-game series in Milwaukee on Thursday night. They lead the Brewers by 3 ½ games in the NL Central.

Steven Souza Jr. hit his 30th home run in the first inning and the Rays added three more runs in the second off Jon Lester.

Wilson Ramos, who had three of Tampa Bay’s 10 hits, made it 7-0 with a two-run single in the fifth that knocked Lester (11-8) out of the game.

Lester, who had won three starts since coming off the disabled list on Sept. 2, gave up seven runs and eight hits with three walks in 4 1/3 innings. He had no strikeouts.

Snell (4-6) gave up singles to John Jay in the third and Addison Russell in the fifth. He walked three and struck out five in seven innings. Snell is 4-0 in 10 starts since July 24.

PHILLIES 7, DODGERS 5

PHILADELPHIA — Aaron Altherr hit a tiebreaking, two-run single in the eighth after launching a tying, two-run homer an inning earlier, and Philadelphia beat slumping Los Angeles.

The Dodgers have lost four straight and 20 of 25 and will have to wait to wrap up the NL West.

The Phillies have won eight of 10 and are 32-33 since the All-Star break, climbing out of last place in the majors.

Luis Avilan (2-3) walked Cesar Hernandez to start the bottom of the eighth. Freddy Galvis bunted and catcher Austin Barnes made a wild throw to second base for an error that allowed the runners to reach second and third. Odubel Herrera struck out and Rhys Hoskins was intentionally walked. Brandon Morrow entered and Altherr ripped a hit off the right-field fence.

Earlier in the series, Altherr became the first major leaguer to hit a grand slam off Clayton Kershaw.

Luis Garcia (2-4) got the win despite allowing a run in the eighth. Hector Neris finished for his 23rd save in 26 chances.

PIRATES 6, BREWERS 4

PITTSBURGH — Adam Frazier hit a two-run homer off Milwaukee closer Corey Knebel with two outs in the ninth inning to lift Pittsburgh to the victory.

The Pirates tied it in the eighth on a throwing error by Knebel then ended a seven-game losing streak when Frazier homered into the first row of seats in the right-field stands.

Jesus Aguilar and Domingo Santana homered for the Brewers but Milwaukee missed a chance to pull into a tie with Colorado for the second wild-card spot in the National League.

Knebel (1-2) had converted 21 straight save opportunities. Milwaukee lost for just the third time in its last 12 games.

Felipe Rivero (5-2) earned the victory in relief. Frazier finished 2 for 5 with four RBIs. Starling Marte added two hits for the Pirates.

ROYALS 15, BLUE JAYS 5

TORONTO — Mike Moustakas hit his 37th home run of the season, breaking Steve Balboni’s Royals record, Salvador Perez and Whit Merrifield also connected and Kansas City routed Toronto.

Rookie right-hander Jakob Junis (8-2) allowed four runs, two earned, in 6 1/3 innings, improving to 5-0 with a 2.42 ERA over his past eight starts.

Moustakas went 3 for 4 and came within a triple of hitting for the cycle. He eclipsed Balboni’s 1985 record with a solo blast to right off Carlos Ramirez in the sixth.

Merrifield also had three hits and drove in a pair of runs as the Royals snapped a three-game losing streak and won for the second time in their past seven.

Kansas City came within a run of matching its season high. The Royals scored 16 against Detroit twice within a seven-day span in late July.

Leading 1-0, the Royals exploded for eight runs and seven hits in the second. Brett Anderson (3-4) allowed eight runs and seven hits in 1 1/3 innings.

GIANTS 4, ROCKIES 0

SAN FRANCISCO — Colorado starter Tyler Chatwood dug himself an early hole against the Giants and now the Rockies’ lead for the second NL wild card is in jeopardy after a loss to last-place San Francisco, the club’s third straight defeat.

Joe Panik hit a one-out triple in the first off Chatwood (8-13) and immediately scored on Denard Span’s sacrifice fly, and then Panik doubled in the third and came home on Buster Posey’s sacrifice fly.

Brandon Crawford hit a solo homer in the third to back Matt Moore (6-14), who earned his first win against Colorado after going 0-2 over his first three outings of the year.

After two straight 4-3, walkoff setbacks, the Rockies lost for the fifth time in seven games overall following a six-game winning streak.

CARDINALS 9, REDS 2

CINCINNATI — Dexter Fowler homered for the third straight game while Matt Carpenter and Paul DeJong also homered as St. Louis gained ground in its playoff push with a win over Cincinnati.

Tommy Pham finished with two doubles, a single and two RBIs and Yadier Molina added a two-run double as the third-place Cardinals (79-72) gained a game on Colorado in the wild-card race to move within 2 ½ games. St. Louis sits five games behind the Cubs in the NL Central chase.

Rookie right-hander Luke Weaver (7-1) retired 10 straight batters in one stretch on the way to his seventh straight winning start, the major leagues’ longest active streak and the longest by a Cardinals pitcher this season. The 24-year-old allowed five hits and two runs with seven strikeouts in five innings.

Relievers Zach Duke, Seung Hwan Oh, Sandy Alcantara and Sam Tuivailala teamed up to retire 12 of the final 13 Reds batters.

Rookie Davis (1-3) gave up all three homers and five runs on five hits with three strikeouts in three innings.

NATIONALS 7, BRAVES 3

ATLANTA — Braves closer Arodys Vizcaino issued three bases-loaded walks in the six-run eighth, Gio Gonzalez pitched seven strong innings and Washington beat Atlanta.

Gonzalez (15-7) allowed two runs, three hits and one walk to enjoy some rare good luck in the series. The left-hander, who struck out eight, began the night 4-11 with a 5.27 ERA in 20 career starts against the Braves.

The NL East champion Nationals rallied from a 2-1 deficit for their third straight win.

Pinch-hitter Wilmer Difo singled, Trea Turner doubled and Jayson Werth walked in the eighth against Jose Ramirez (2-3). Braves manager Brian Snitker brought in Vizcaino, and the move quickly backfired.

Daniel Murphy, Ryan Zimmerman and Anthony Rendon walked, and Vizcaino left without a retiring a batter. Rex Brothers then gave up Adam Lind’s two-run single and Michael Taylor’s RBI single to make it 7-2.

Ramirez allowed three runs, two hits and one walk with one strikeout in 1/3 of an inning.

ASTROS 4, WHITE SOX 3

HOUSTON — Yuli Gurriel had three hits, including a two-run double, Brad Peacock threw six solid innings and Houston extended its winning streak to six games with a win over Chicago.

Peacock (12-2) allowed two runs on one hit with six strikeouts. The right-hander continues to throw well, allowing two runs or fewer in each of his last five starts.

After Yoan Moncada put the White Sox up 2-1 in the top of the fourth with a two-run homer, Gurriel answered with his two-run hit in the bottom half of the inning.

Jose Altuve upped Houston’s lead to 4-2 with an RBI single in the seventh, but Yolmer Sanchez cut the lead to one with an RBI double in the eighth.

Joe Musgrove struck out Moncada with the tying run on second to end the eighth and struck out Omar Narvaez with the tying run on second to end the game for his second save.

James Shields (4-7) allowed three runs on six hits with four walks and five strikeouts in 5 2/3 innings.

MARLINS 5, METS 4, 10 INNINGS

MIAMI — J.T. Realmuto homered in the 10th inning, and Miami beat New York after rallying for three runs in the ninth against former teammate A.J. Ramos.

With one out, Realmuto hit a 1-1 pitch from Paul Sewald (0-6) into the Mets’ bullpen for his 17th homer.

Miami trailed 4-1 in the ninth before coming back against Ramos, who faced the Marlins for the first time since they traded the closer to New York on July 28.

Justin Bour led off with his 22nd homer and first since a six-week stint on the disabled list. Ramos then gave up four singles, including two-out RBI hits by pinch-hitter A.J. Ellis and Ichiro Suzuki.

Sewald replaced Ramos and struck out Christian Yelich on a 3-2 breaking ball with the bases loaded to force extra innings. Ramos’ blown save was his first with the Mets.

Major league home run leader Giancarlo Stanton walked a season-high four times and struck out in his only at-bat to remain at 55 homers with 11 games to go.

ATHLETICS 3, TIGERS 2

DETROIT — Daniel Mengden pitched seven scoreless innings, and Marcus Semien homered and drove in three runs, leading Oakland to a 3-2 win and three-game sweep of Detroit.

Mengden (2-1) allowed seven hits and struck out four, extending his scoreless streak to 16 1/3 innings and helping the A’s to their fourth consecutive win. The 24-year-old right-hander missed the first two months of the season after undergoing offseason foot surgery and was making his fifth major league start this year.

Liam Hendriks got the final two outs in the ninth to earn his first save.

Anibal Sanchez (3-5) pitched well in a losing effort, allowing three hits and one run in six innings. He struck out eight and walked three.