HOUSTON (AP) -- New York catcher Brian McCann hit a grand slam as the Yankees won 9-6 at Houston on Saturday in a see-sawing contest that needed two surges by the visitors to win.
The victory kept the Yankees within half a game of the lead in the closely fought American League East division, where Toronto -- which suffered a home shutout defeat at the hands of Texas -- is in fourth place but only two games off the top.
The overall AL leader Kansas City won narrowly at Oakland while the National League's top team, St. Louis, comfortably beat the Chicago Cubs to become the first team in the majors to reach 50 wins.
New York jumped ahead early at Houston, with McCann's four-run shot coming in the first inning. A two-run homer by Chris Young off Brett Oberholtzer -- later ejected for hitting Alex Rodriguez with a pitch -- put the Yankees up 6-0.
The AL West-leading Astros fought back and tied the game in the fifth inning when rookie Carlos Correa hit a two-run homer, and Jose Altuve followed in the next at-bat with a long shot of his own.
The Yankees went ahead for good when Mark Teixeira hit a two-run double in the eighth.
Texas' Yovani Gallardo extended his scoreless streak to a career-high 23 innings by pitching into the ninth inning and guiding the Rangers to a 4-0 win at Toronto.
Gallardo (7-6) fell two-outs shy of his first shutout and first complete game since 2011 but won his fourth straight decision and ended Texas' six-game losing skid.
Toronto starter Matt Boyd made his major league debut and gave up three homers.
Kansas City's Chris Young bounced back from his worst start of the season to pitch six innings and guide the Royals to a 3-2 victory at Oakland.
Young (7-3) allowed four hits and one walk.
Kendrys Morales hit a two-run single in the sixth that erased a 2-1 deficit and lifted the Royals to their fourth win from five games on this road trip.
St. Louis' Michael Wacha pitched six solid innings to steer the Cardinals past the Cubs 8-1.
Wacha (10-3) allowed just one run in a good response to his previous start when he gave up five runs against Philadelphia.
Jason Heyward reached base four times in St. Louis' fifth straight victory.
Pittsburgh won 8-4 against out-of-touch Atlanta but lost star center fielder Andrew McCutchen to injury after he was hit on the left elbow by a pitch.
McCutchen took a fastball from Julio Teheran (5-4). X-rays were negative and the 2013 NL MVP will be reevaluated on Sunday.
Starling Marte got three hits and scored three times for the Pirates, who scored five runs in the first inning and sent the Braves to their fifth successive loss.
Tampa Bay kept just ahead of the Yankees in the AL East by defeating Boston 4-1.
Rays starter Matt Andriese (3-2) retired his first 11 batters and struck out five in a career-high six innings, combining with three relievers to limit the Red Sox to only three hits.
Jake Elmore hit a two-run homer for Tampa Bay.
San Francisco's Buster Posey drove in two runs for the Giants, who rallied to beat Colorado 7-5.
Andrew Susac had a three-run double in the seventh inning off Rafael Betancourt (2-3).
Colorado's Nolan Arenado extended his hitting streak to 14 games with an RBI double for the Rockies, who had won five of six.
Miami's Tom Koehler pitched seven innings to direct the Marlins to a 3-2 win against the Los Angeles Dodgers.
Seattle's Robinson Cano was hit in the head by a stray ball during an inter-innings warm-up and was forced out of the game as the Mariners lost 4-2 against the Los Angeles Angels.
San Diego's Justin Upton hit a two-run homer as the Padres beat Arizona 7-2 and won consecutive games for the first time in three weeks.
Minnesota's Torii Hunter homered twice and doubled to lead the Twins past Milwaukee 5-2.
The game between the New York Mets and Cincinnati was suspended at 1-1 after six innings due to showers and will be completed on Sunday, while three other games did not start due to rain: Detroit at the Chicago White Sox, Baltimore at Cleveland and Philadelphia at Washington.