HOUSTON - Jason Castro hit a three-run homer with two outs in the ninth inning to give the Houston Astros a 3-0 victory and a three-game sweep of the Los Angeles Angels on Thursday night.

The win moves first-place Houston two games ahead of the Angels in the AL West.

It was 0-0 to start the bottom of the ninth inning. Jed Lowrie drew a walk off Jose Alvarez (2-2) with one out before a two-out single by Marwin Gonzalez. Castro then launched his two-out shot off Fernando Salas into the seats in right field to give Houston the win.

Luke Gregerson (4-1) pitched a scoreless ninth for the win.

Scott Kazmir allowed three hits and struck out five in 7 2/3 scoreless innings in the first start for the Astros in his hometown and his second since a trade from the Oakland Athletics.

PADRES 8, METS 7

NEW YORK - Justin Upton hit a three-run homer through a driving rain with two outs in the ninth inning, and San Diego stunned New York, overcoming a six-run deficit during a game delayed nearly four hours by two storms.

With a darkening sky overhead, Jeurys Familia entered with a 7-5 lead and got two quick outs in the ninth before a torrential downpour stopped play. Frustrated, the Mets closer stood on the mound as the other players cleared the field.

When play resumed 44 minutes later, Derrick Norris fell behind 0-2 before singling for his career-high fifth hit. Matt Kemp singled as the rain began again and Upton, in what could be his final at-bat with the Padres, sent the first pitch soaring to right-centre for San Diego's first lead.

Afrer Yangervis Solarte grounded out, play was halted again, this time for 2:52. Craig Kimbrel then was perfect in a 5-minute ninth for his 30th save, in front of just several hundred fans.

CARDINALS 9, ROCKIES 8

ST. LOUIS - Matt Carpenter hit a pair of home runs and Greg Garcia's bases-loaded walk capped a three-run rally in the ninth inning as St. Louis beat Colorado.

Carpenter went 4 for 5 with four RBIs after moving back to the leadoff spot. It was his first career multihomer game and he has a career-high 12 home runs this season.

Jhonny Peralta's two-run single off Rockies closer John Axford tied the game at 8-all and Garcia's walk scored Kolten Wong as the Cardinals recorded their seventh walk-off win of the season.

Axford (3-5) took his third loss in his last four outings.

Cardinals starter Carlos Martinez gave up five runs on 10 hits in five innings. Carlos Villanueva (4-3) earned the win.

RANGERS 7, YANKEES 6

ARLINGTON, Texas - Josh Hamilton delivered a game-ending RBI single with two outs in the ninth inning and Texas beat AL East-leading New York.

Hamilton also had a three-run homer for the Rangers, who scored the winning run after a wild ninth to split the four-game series.

Delino DeShields drew a leadoff walk in the ninth off Nick Goody (0-1), who was making his major league debut. Yankees closer Andrew Miller got Elvis Andrus out on a deep fly ball before DeShields became the second out when he was hit on the foot by Leonys Martin's hard shot while running the bases.

Martin went to second on Adrian Beltre's walk and scored when Hamilton singled to right.

Mark Teixeira homered twice for the Yankees, and Brian McCann also went deep.

INDIANS 3, ATHLETICS 1

OAKLAND, Calif. - Carlos Carrasco threw a two-hitter, Carlos Santana hit a two-run homer and Cleveland beat Oakland.

Francisco Lindor had two hits for the Indians, who won their second straight following a six-game losing streak.

Josh Reddick doubled in a first-inning run for the A's, who have lost six of their last seven.

Carrasco did not allow a hit after Reddick's double, facing one over the minimum from that point. He walked one and struck out seven. He was coming off his worst start of the season in which he allowed six runs in four innings.

Chris Bassitt (0-4) gave up three runs, his season high, on six hits. He walked one and struck out a season-best six.

NATIONALS 1, MARLINS 0

MIAMI - Max Scherzer scattered three hits over seven innings, Jonathan Papelbon got his first save for Washington with a perfect ninth inning and the Nationals beat Miami.

Backed by Ryan Zimmerman's second-inning homer off Dan Haren, Scherzer (11-8) struck out six and lowered his ERA to 2.22.

Former closer Drew Storen pitched a perfect eighth, striking out two in his new setup role.

Papelbon, acquired Tuesday from Philadelphia, retired Ichiro Suzuki on a comebacker, got Christian Yelich to line out and struck out pinch-hitter Michael Morse for his 18th save in 18 chances this season.

Haren (7-7) gave up four hits in six innings and lowered his ERA to 3.42.

BLUE JAYS 5, ROYALS 2

TORONTO - Dioner Navarro hit a two-run home run, Russell Martin and Josh Donaldson added solo shots and Toronto beat Kansas City.

The Blue Jays, who acquired star pitcher David Price from Detroit earlier in the day, have homered in 12 consecutive games since the All-Star break, their longest streak of the season.

Price was not with the Blue Jays on Thursday but is expected to join them Friday. Toronto has not said when Price will make his first start but Sunday is a possibility.

Marco Estrada (8-6) allowed two runs and three hits in 5 2-3 innings. Estrada left after Lorenzo Cain's two-out single in the sixth ended his run of 15 straight outs. Brett Cecil came on and retired Eric Hosmer.

LaTroy Hawkins pitched the seventh, Aaron Sanchez worked the eighth and Roberto Osuna finished for his sixth save.

RED SOX 8, WHITE SOX 2

BOSTON - Xander Bogaerts and David Ortiz each had three hits and Boston beat Chris Sale, snapping Chicago's seven-game winning streak.

Knuckleballer Steven Wright (4-4) pitched seven effective innings in Boston's third win in 15 games. Brock Holt had a two-run single in a four-run sixth.

Jose Abreu hit a two-run homer in the first for the White Sox, who head home for a weekend series against the Yankees after a 7-1 road trip moved them into contention for an AL wild-card spot.

The first five batters reached in Boston's four-run sixth before Sale (9-6) was lifted. He allowed seven runs and 12 hits in his worst start since April.

CUBS 5, BREWERS 2

MILWAUKEE - Anthony Rizzo hit a three-run homer with two out in the eighth inning, and Chicago beat Milwaukee.

The Cubs won for the third time in four games since they were swept in a weekend series against lowly Philadelphia. Rizzo finished with three hits and Dexter Fowler went 2 for 4.

Jimmy Nelson pitched seven innings of two-hit ball for Milwaukee, but Chicago rallied in the eighth. Addison Russell and Fowler singled against Jeremy Jeffress before Will Smith (4-2) came in.

Smith retired his first two batters, but Rizzo connected for his 18th homer to give the Cubs a 3-2 lead.

TWINS 9, MARINERS 5

MINNEAPOLIS - Eddie Rosario finished a single shy of the cycle and drove in three runs to help Minnesota snap a four-game skid with a victory over Seattle.

Aaron Hicks and Brian Dozier also homered for the Twins, who had lost 10 of their previous 12 games. Phil Hughes (10-6) gave up five runs on 10 hits and struck out five in five innings and Joe Mauer extended his hitting streak to 11 games.

Austin Jackson and Seth Smith hit two-run homers for the Mariners, who traded outfielder Dustin Ackley to the New York Yankees before the game. J.A. Happ (4-6) gave up seven runs - six earned - on nine hits in 3 1/3 innings.

REDS 15, PIRATES 5

CINCINNATI - Brandon Phillips hit a pair of three-run homers and drove in a career-high seven runs, powering the Reds to a victory that kept Pittsburgh winless in Cincinnati this season.

The Reds opened the season with a three-game sweep of the Pirates at Great American Ball Park. They improved to 4-0 on Thursday night by taking advantage of struggling A.J. Burnett (8-5), sending the Pirates to their most lopsided loss of the season.

Pittsburgh hadn't allowed so many runs since a 15-5 loss to Arizona on Aug. 17, 2013.

Marlon Byrd also hit a three-run homer, and Jay Bruce drove in three runs with a sacrifice fly and a double as the Reds improved to 8-2 overall against the Pirates this season.

Left-hander David Holmberg (1-0) was called up from Triple-A and allowed two runs and five hits in six innings.

TIGERS 9, ORIOLES 8

BALTIMORE - Yoenis Cespedes homered and drove in three runs and Detroit beat Baltimore after shifting into rebuilding mode by trading two of their best pitchers.

Mired in fourth place in the AL Central, Detroit dealt starter David Price to Toronto and closer Joakim Soria to Pittsburgh the day before the non-waiver trade deadline.

General manager Dave Dombrowski conceded, "I would much rather be acquiring than I would be trading. But it's just where we are at this point."

After an active day of dealing, the Tigers kept busy on the bases. Detroit finished with 16 hits, including three apiece by Cespedes, Ian Kinsler and Jose Iglesias.

The Tigers led 7-0 in the fourth inning and 9-2 in the sixth before surviving Baltimore's comeback bid.

PHILLIES 4, BRAVES 1

PHILADELPHIA - Domonic Brown homered and Aaron Harang snapped his losing streak at eight starts, leading Philadelphia to a victory over Atlanta.

Carlos Ruiz had two RBIs and every Phillies starter had at least one hit as they won their 10th game in the 12 since the All-Star break.

Harang (5-11) was making his first start since going on the disabled list on July 2 with plantar fasciitis in his left foot. He allowed one run and nine hits with three strikeouts and one walk in five innings to earn his first victory since May 14.

Shelby Miller (5-8) extended his winless streak to 13 starts after giving up four runs and 11 hits in six innings. A.J. Pierzynski had two hits and an RBI for slumping Atlanta, which lost for the 14th time in 18 games while dropping its 11th road game in the last 12.