The Tampa Bay Rays took a combined perfect game into the ninth inning before Hanser Alberto beat the shift with a leadoff single against Ryan Yarbrough, wrecking history in the making and taking some of the edge off their 4-1 victory over the Baltimore Orioles on Sunday.

Ryne Stanek pitched the first two innings before Yarbrough took over.Yarbrough was literally unhittable — until the ninth.

Tampa Bay's try for the first combo perfect game in the majors came two days after a pair of Los Angeles Angels pitchers teamed up for a no-hitter.

Tampa Bay Rays starting pitcher Ryne Stanek throws to a Baltimore Orioles batter during the first inning of a baseball game, Sunday, July 14, 2019, in Baltimore. (AP PhotoJulio Cortez)

Tampa Bay Rays starting pitcher Ryne Stanek throws to a Baltimore Orioles batter during the first inning of a baseball game, Sunday, July 14, 2019, in Baltimore. (AP PhotoJulio Cortez)

Alberto pushed a grounder to the right side, precisely where the second baseman usually stands. Stevie Wilkerson followed with a single, and an RBI single by Anthony Santander off Oliver Drake enabled Baltimore to break up the shutout.

Emilio Pagan struck out Trey Mancini for his sixth save.

Yarbrough (8-3) allowed only five balls out of the infield by Baltimore, all of them becoming routine outs.

Michael Brosseau and Austin Meadows homered off Tom Eshelman (0-2) as Rays won three of four from the Orioles, who own the worst record in the majors.

YANKEES 5, BLUE JAYS 2

Masahiro Tanaka pitched six strong innings, Gio Urshela drove in two runs, and New York beat Toronto.

Tanaka (6-5) allowed two runs, four hits and struck out five without a walk. Aroldis Chapman pitched a perfect ninth for his 25th save in 28 chances.

The Yankees took a 2-0 lead in the second inning on Urshela's two-run single to left field off Toronto starter Marcus Stroman (5-10).

Stroman, a New York native, started for the first time since June 29 after being sidelined with a left pectoral cramp. He gave up three runs and seven hits in six innings while striking out seven and walking two.

Randal Grichuk and Eric Sogard had solo homers in the fifth for Toronto.

Mike Tauchman hit his fifth homer of the season for New York.

PHILLIES 4, NATIONALS 3

Maikel Franco homered with one out in the bottom of the ninth inning and Philadelphia avoided a sweep by Washington.

J.T. Realmuto, who had an RBI single in the fourth, also homered for the Phillies, who also got a two-run single from Jean Segura.

Trea Turner, Matt Adams and Howie Kendrick drove in runs for the Nationals, who lost for just the third time in 15 games. Matt Grace (0-2) took the loss.

Washington's pitching staff entered having allowed 102 homers, fewest in the NL and second-fewest in the majors behind Tampa Bay.

Phillies starter Jake Arrieta gave up one run and four hits in five innings.

Nationals right-hander Anibal Sanchez allowed three runs and six hits in six innings.

INDIANS 4, TWINS 3

Carlos Santana hit a solo home run that broke a seventh-inning tie and Cleveland avoided a sweep against AL Central-leading Minnesota.

Santana lined an 0-2 pitch from Trevor May (3-2) into the right-field seats for his 21st homer of the season.

Adam Cimber (5-2) pitched 1 1/3 innings and worked out of two jams. The right-hander struck out Nelson Cruz with the bases loaded to end the seventh and whiffed Miguel Sanó with the tying run on second to finish the eighth. Brad Hand pitched the ninth for his 24th save in 25 opportunities.

Shane Bieber took a three-hit shutout into the seventh before Minnesota rallied with three runs and tied the game.

Twins All-Star José Berríos allowed three runs in in five innings.

ANGELS 6, MARINERS 3

Rookie Matt Thaiss hit a tiebreaking three-run homer in the eighth inning, and Los Angeles completed a three-game sweep.

Mike Trout left the game before the third inning due to right calf tightness, but the Angels (48-46) kept rolling two days after their cathartic no-hit victory in their first home game since the death of pitcher Tyler Skaggs.

After Kole Calhoun walked and went to third on pinch-hitter Justin Bour's two-out single off Anthony Bass (1-3), Thaiss connected off Seattle's Roenis Elias for his first career homer and helped the Angels to their sixth win in nine games since Skaggs' death.

Ty Buttrey (5-4) pitched the eighth, and Hansel Robles finished for his 13th save.

Calhoun hit his 21st homer for the Angels and Shohei Ohtani got his 100th major league RBI for the Angels, who also tagged out three Mariners at the plate.

Domingo Santana and Austin Nola homered for the Mariners, who have lost seven of eight.

BRAVES 4, PADRES 1

Freddie Freeman hit a three-run homer in the eighth inning and All-Star rookie Mike Soroka struck out a career-high nine to win his 10th straight decision as Atlanta finished off a three-game sweep.

The NL East-leading Braves have won seven of eight.

Soroka (10-1) lost his season debut on April 18 against Atlanta but has won each of his last 10 decisions since April 24, a span of 15 starts.

He got Sunday's decision thanks to Freeman's shot deep to right field off Trey Wingenter (1-2) with two outs in the eighth. Soroka allowed six hits in seven scoreless innings and walked one. His previous strikeout high was eight in a 3-1 home win against San Diego on April 29. The 21-year-old made five starts in 2018.

A.J. Minter pitched the ninth for his fifth save.

ATHLETICS 3, WHITE SOX 2

Chad Pinder scored all the way from first base when White Sox shortstop Jose Rondón made a throwing error trying to start a double play in the ninth inning and Oakland beat Chicago.

After acquiring pitcher Homer Bailey from Kansas City earlier in the day, the A's completed a three-game sweep. They have won 10 of 12 to put themselves in solid playoff contention.

Pinder singled as a pinch-hitter off Jace Fry (1-4) to begin the ninth. Ramón Laureano, who homered in the eighth to tie it at 2, followed with a sharp grounder to the left side of the infield.

Rondón made a backhanded stop, hurried and threw on the run. But the ball sailed past second baseman Yolmer Sánchez and rolled into the large foul territory near Chicago's bullpen, and Pinder scored standing up.

Liam Hendriks (4-0) retired three batters to win.

Eloy Jiménez homered for the White Sox.

ASTROS 12, RANGERS 4

Justin Verlander followed a two-run first inning with five no-hit innings and José Altuve hit Houston's franchise-record ninth grand slam of the season.

Verlander (11-4) gave up four hits, all singles, and struck out seven. He retired his last 15 batters following a leadoff walk in the second inning as the Astros salvaged a split of the four-game series after losing the first two games.

Verlander didn't allow a home run for the first time since June 6. He has given up a major league high 26 homers this season — four shy of his career high in a full season.

Altuve, the Astros' leadoff hitter with George Springer given the day off, had three hits and scored three times after having four hits in Saturday's 11-inning win.

Ariel Jurado (5-5) gave up five runs in the first two innings pitching on six days' rest in making his first start since July 3.

ROCKIES 10, REDS 9

Ryan McMahon singled, doubled, tripled and drove in three runs to lead Colorado.

A day after the Reds romped 17-9, Colorado bounced back with a couple of big innings.

McMahon hit a two-run double as the Rockies scored four times in the first inning. He had an RBI triple in a six-run fifth that made it 10-5.

Phillip Ervin, who tied a Reds record with six hits on Saturday night, had a leadoff triple in a four-run sixth that made it close.

It took the back end of the Rockies bullpen to finally quiet down the Reds. Scott Oberg pitched two scoreless innings and Wade Davis worked a perfect ninth for his 14th save.

Antonio Senzatela (8-6) got the victory despite allowing eight runs and seven hits in 5 1/3 innings.

Tyler Mahle (2-10) allowed 10 runs — six earned — on 12 hits in 4 1'3 innings in losing a fifth consecutive decision.

METS 6, MARLINS 2

Robinson Cano homered for the second consecutive game, helping New York beat Miami.

Cano finished 4 for 5 for his first four-hit game since May 7 at San Diego.

Jacob deGrom (5-7) pitched five innings and allowed six hits and one run for the Mets. He struck out six and walked three.

Jeff McNeil also homered and knocked in a pair of runs for the Mets. Pete Alonso, Michael Conforto, and Adeiny Hechavarria each drove in a run.

Miami's Sandy Alcantara (4-9) tossed six innings, allowing nine hits and four runs. Miguel Rojas went 3 for 5 with an RBI single, and Garrett Cooper hit his 10th homer in the ninth.

GIANTS 8, BREWERS 3

Tyler Beede pitched effectively into the seventh inning, had two hits and drove in the go-ahead run in San Francisco's win over Milwaukee.

Brandon Belt homered for the Giants, who took two out of three in the series.

Belt's solo homer with one out in the fifth, his 11th of the season, off Milwaukee starter Jhoulys Chacin put the Giants in front 2-1.

Christian Yelich hit his 32nd homer of the season in the sixth.

Corbin Burnes (1-5) gave up four hits and four runs without retiring a batter.

Beede (3-3) gave up seven hits and three runs in 6 2/3 innings. He struck out seven and didn't walk a batter.

CARDINALS 5, DIAMONDBACKS 2

Paul Goldschmidt homered, Adam Wainwright pitched seven scoreless innings, and St. Louis held on to beat Arizona.

Wainwright (6-7) allowed four hits, walked one and struck out seven. Carlos Martinez earned his fifth save.

Domingo Leyba and Jarrod Dyson had RBI singles for Arizona.

Zack Greinke (10-4) gave up five runs in six innings. The loss snapped a five-year July winning streak for the Arizona ace, who entered the game 14-0 with a 1.34 ERA in his last 18 starts in the month dating back to July 25, 2014.

TIGERS 12, ROYALS 8

Jeimer Candelario hit a bases-clearing double and Gordon Beckham added a two-run homer during a seven-run third inning, and Detroit beat Kansas City.

Harold Castro had a pair of hits during the marathon fame, when the Tigers trotted 11 batters to the plate against fill-in starter Brian Flynn (2-1). The first six reached base safely, and Brandon Dixon and Niko Goodrum also drove in runs before reliever Jorge Lopez finally ended the inning.

Flynn was yanked six batters into the third without recording an out. He allowed seven runs on eight hits.

Jordan Zimmermann allowed seven runs on eight hits before he was pulled after facing four batters in the fifth inning. He hasn't won since last Sept. 5.

Nick Ramirez (4-3) earned the win for Detroit after allowing one run over three innings.

Jorge Soler homered and had three RBIs for the Royals.

CUBS 8, PIRATES 3

Jason Heyward, Albert Almora Jr. and Kyle Schwarber hit home runs and Chicago completed a three-game sweep of Pittsburgh.

The NL Central leaders posted their first series win since taking all three from St. Louis on June 7-9.

Robel Garcia had a pair of doubles and Anthony Rizzo added two hits as Chicago improved to 32-16 at Wrigley Field.

Bryan Reynolds got two hits and drove in a run for Pittsburgh, which has dropped five of seven.

Cubs starter Jose Quintana (7-7) allowed three runs on six hits in six innings to win his third straight start. The left-hander struck out four and walked two.

Trevor Williams (3-3) took the loss.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports