Houston's Evan Gattis hit a three-run homer and Luis Valbuena added a go-ahead solo shot in a five-run third inning that lifted the American League-leading Astros 6-4 over Baltimore on Tuesday.

The victory moved the Astros five games clear atop the AL West division as their nearest rivals, the Los Angeles Angels, lost to an outstanding performance by Tampa Bay rookie pitcher Chris Archer.

In the National League, Pittsburgh continued its surge by downing San Francisco, and San Diego dropped the New York Mets out of the NL East lead.

Baltimore got on top of Houston early with a four-run second inning, but the Astros responded in the next frame and went on to post a MLB-leading 17th come-from-behind win.

Houston trailed by three when the homer by Gattis made it 4-4, and the Astros went back to back when Valbuena homered to right field.

Tampa Bay won 6-1 at the Angels, with pitcher Archer tying a franchise record with 15 strikeouts over his eight innings.

Archer (6-4) matched James Shields' club record set over nine innings in a game in 2012. He did not walk a batter.

The one run he did allow was Albert Pujols 14th homer of the season, moving him to 534 in his career, tied with Jimmie Foxx for 17th place on the MLB all-time list, and putting him two behind Mickey Mantle. And he did it in his 8,134th big league at-bat — the exact same number that Foxx finished his career with.

Pittsburgh made it 10 wins in 12 games by beating San Francisco 7-4, with Andrew McCutchen having four hits and driving in two runs.

Pedro Alvarez also drove in two as the Pirates clinched a series victory in their first encounter with the team that they lost to in last year's NL wild-card playoff.

The Giants have lost five straight games, and have dropped two games off the division lead.

San Diego pitcher Ian Kennedy threw six strong innings and outpitched Mets rookie sensation Noah Syndergaard as the Padres won 7-2.

Kennedy (3-5) broke a four-start losing sequence.

Syndergaard (2-3) flashed enough quality pitches to strike out 10 but the Padres scored seven runs in four innings; Syndergaard's shortest of his five career starts.

The Los Angeles Dodgers split a doubleheader at Colorado, with Alex Guerrero hitting a grand slam with two outs in the top of the ninth inning to give the visitors a 9-8 win in the night game.

Guerrero sent a fastball from Rafael Betancourt (2-2) to the deepest part of Coors Field, just eluding the glove of the leaping center fielder. It was Guerrero's first career grand slam and fourth homer of the day for the Dodgers.

In the opener, Jorge De La Rosa threw six solid innings despite a cut on the middle finger of his pitching hand, steering the Rockies to a 6-3 win.

Cleveland's Michael Brantley drove in the go-ahead run with two outs in the eighth inning to give the Indians a 2-1 win against Kansas City.

Indians starter Carlos Carrasco (7-4) struck out eight over seven innings to win his third straight start.

The reigning AL champion Royals have lost six of their past seven games.

Toronto's Kevin Pillar hit two home runs off Washington ace Max Scherzer, including a go-ahead three-run drive, as the Blue Jays beat the Nationals 7-3 in the night game to split a doubleheader.

Scherzer (6-4) had won each of his previous five starts and appeared poised for another with a 3-1 lead. Pillar, however, drove a pitch over the wall in left field in the sixth for his second homer of the game for a 4-3 lead.

In the day game, Washington's Jordan Zimmermann pitched eight scoreless innings to steer the Nationals to a 2-0 win.

Garrett Jones hit a three-run homer in the top of the 11th inning to give the New York Yankees the lead against Seattle, and Andrew Miller preserved the 5-3 win in the bottom half by striking out the last batter with two runners on base.

Clay Buchholz pitched eight scoreless innings to guide the Boston Red Sox to a 1-0 win against Minnesota, and Lance Lynn shut down his opposition over 7-2/3 innings as St. Louis beat Milwaukee 1-0.

Joey Gallo hit an upper-deck homer, doubled off the top of the wall and set a Texas Rangers record for a MLB debut with four RBIs as they crushed the Chicago White Sox 15-2.

Arizona won a back-and-forth game against Atlanta 7-6, Ben Zobrist's grand slam highlighted a five-run seventh inning as Oakland rallied past Detroit 5-3, Miami dusted off the Chicago Cubs 5-2, and Philadelphia enjoyed an uncommon late-inning comeback victory over Cincinnati 5-4.