Astros 9, Rangers 5

(Updated: Blackley received the win (1-0)...not Wright.)

Astros 9, Rangers 5: Jason Castro hit a three-run homer and Brandon Barnes and Jake Elmore each hit two-run shots as visiting Houston knocked off Texas.

Castro’s seventh-inning blast snapped a tie and gave the Astros a 7-4 lead and Elmore smacked his first-major league homer in the following inning. Travis Blackley (1-0) pitched 1 1/3 hitless innings and Marc Krauss had three hits and two RBIs for Houston, which snapped a six-game losing skid against the Rangers.

Geovany Soto and Nelson Cruz hit homers for Texas, which dropped to 31-2 when scoring five or more runs this season. Rangers ace Yu Darvish (8-4) was charged with five runs and six hits in six-plus innings and failed to win for the eighth time in nine starts.

Houston built a 4-0 lead on Barnes’ two-run homer in the fourth and Krauss’ two-run single in the fifth. Texas tallied four times in the sixth on Mitch Moreland’s sacrifice fly and Soto’s three-run homer off Wesley Wright.

Darvish was removed after walking Jose Altuve to start the seventh. Robbie Ross hit Brett Wallace with a pitch before Castro belted the tiebreaking homer over the center-field fence.

GAME NOTEBOOK: Castro was selected to be Houston’s All-Star representative. Cruz, Darvish and closer Joe Nathan are on the squad from Texas. … Rangers 2B Ian Kinsler was twice thrown out trying to steal by Castro. … Astros starter Dallas Keuchel allowed two runs and six hits in five-plus innings.