HOUSTON (AP) After the Houston Astros rallied in the ninth inning, the Boston Red Sox kept the battle going until the 12th.
Ryan Hanigan fought through a 13-pitch at-bat for a walk that loaded the bases, and Jackie Bradley Jr. did the rest.
Bradley lined a tie-breaking RBI single in the 12th inning after Houston's Colby Rasmus hit a tying two-run homer off closer Craig Kimbrel in the ninth, and the Boston Red Sox beat the Astros 7-5 on Sunday night in a five-hour marathon.
Bradley singled with the bases loaded off Ken Giles (0-2).It was the first run the Red Sox had scored since Bradley belted the second of back-to-back RBI doubles with Hanigan in the third.
''Whether it's in extra innings tonight or other parts of the ballgame where we stake an early lead, give it back or fall behind we continue to come back,'' Red Sox manager John Farrell said.
Mookie Betts grounded into a force at home, and then Giles uncorked a wild pitch that allowed Hanigan to score.
''I don't know what I can do,'' Giles said. ''I put everything on the line, made good pitches, got groundballs. Things aren't going my way right now.''
Heath Hembree (1-0) pitched three scoreless innings and struck out Evan Gattis and Marwin Gonzalez with two on to end it.
''It feels good to contribute to the team,'' Hembree said. ''Just try to get the wins.''
Rasmus hit a 98 mph 0-1 fastball from Kimbrel out to right-center field to tie it 5-5. Rasmus had a tie-breaking grand slam in Houston's 8-3 win over Boston on Saturday.
Carlos Correa doubled to set up Rasmus' tying homer.
''This is a tough loss because of how we battled back,'' Houston manager A.J. Hinch said. ''Obviously, the big home run from Rasmus. Both sides were in position to score even more runs than what we scored. We just lost the battle at the end.''
Pedroia finished a home run shy of the cycle. Hanigan, Betts, Hanley Ramirez and David Ortiz each added two hits in the five-hour marathon.
Gonzalez hit a solo home run in the second to cut the lead to 3-1. Correa and Jose Altuve each had two hits, but Altuve also had two errors, which contributed to four of Boston's runs. It was the first time Altuve had two errors in a game since June 20, 2013.
Boston left-hander Henry Owens lasted 3 1/3 innings in his first start of the season, allowing three runs on five hits with four walks and four strikeouts.
Houston right-hander Scott Feldman was tagged for five runs - three earned - on eight hits with three strikeouts and four walks in 4 1/3 innings.
Red Sox: Xander Bogaerts, who was out of the lineup Saturday after getting hit by a pitch on his right wrist Friday, started and batted third, going 1 for 5 with a walk. ... LHP Eduardo Rodriguez (dislocated right kneecap) will start Thursday for Class A Salem for his first rehab assignment.
Astros: RHP Lance McCullers (right shoulder soreness) threw what manager A.J. Hinch termed ''like a half of a bullpen where he threw with a lot of energy and less pitches'' on Sunday. McCullers will go to the Astros' spring training facility in Florida to get more work in and could get into an extended spring training game before heading out to a rehab game. ... C Max Stassi (left wrist surgery) will play in extended spring training games this week before possibly going out to a minor league affiliate for a rehab game.
A Red Sox fan holding an infant in one arm made a nifty grab with the other in the 12th inning. Pedroia fouled a ball off, and the fan - with a kid in his right arm and a glove on his left hand - reached out to snag a souvenir. Cameras captured the catch and ESPN's national broadcast showed replays of it.
Red Sox: Recalled Owens and RHP Pat Light from Triple-A Pawtucket before Sunday's game. To make room for the pitchers, Boston optioned LHP Roenis Elias and RHP Noe Ramirez to Pawtucket.
Astros: Recalled RHP Michael Feliz from Triple-A Fresno following the game and optioned OF Jake Marisnick to Fresno.
Red Sox: RHP Rick Porcello (3-0) will try to remain undefeated as the Red Sox start four straight games with the Braves on Monday in Atlanta.
Astros: RHP Doug Fister (1-2) will look to build on his last outing where he allowed two runs over six innings in a loss to Texas when the Astros start a three-game series Monday in Seattle.