Updated

All of the dollars spent during the offseason hadn't been adding up to wins for the Los Angeles Angels of Anaheim so far.

But Albert Pujols may have provided the Angels with the spark they needed.

Pujols' game-winning, two-run double in the bottom of the ninth lifted the Halos to a 5-4 win over the Houston Astros in the middle test of a three-game set.

Luis Jimenez worked a one-out walk against Jose Veras (0-1) before J.B. Shuck flew out to left. Mike Trout then recorded an infield single when Marwin Gonzalez couldn't handle his grounder in the hole on the left side. Pujols stepped up next and ripped a sharply-hit grounder down the third-base line to bring home Jimenez and Trout to avoid the Angels' worst start in franchise history.

Pujols' 15th career walk-off hit snapped a four-game home losing streak to start the campaign.

"I thank god I came through, hopefully this win will get us going," Pujols said.

Josh Hamilton smacked his first homer as an Angel, while Michael Roth (1-0) struck out four over two shutout innings to pick up the win.

"It's good to get that first one out of the way," Hamilton said of his homer. "When the ball hit the barrel, it felt nice and easy. Everything just flowed with the swing."

Chris Carter smacked a two-run homer among his two hits and scored twice for Houston, which had its three-game winning streak snapped.

"A tough loss, Albert Pujols is Albert Pujols. He's one of the best players for a reason. It's unfortunate because these guys played their hearts out," Astros manager Bo Porter said.

Matt Dominguez's RBI single and Gonzalez's suicide squeeze in the seventh vaulted Houston to a 4-1 edge, but Los Angeles plated two in the eighth to cut the deficit to a run.

Pujols led off the frame with a single off Rhiner Cruz and after Hamilton struck out, Mark Trumbo pounded a double down the left-field line to put runners on second and third. Howie Kendrick was credited with a sacrifice fly when he lifted a fly ball to right, which J.D. Martinez dropped to allow Pujols to score. Chris Iannetta then hit a sac fly to center to push across Trumbo and make it 4-3, but the tying-runner Kendrick was thrown out at second after hesitating whether or not to tag and move up to third.

Earlier, Carter's two-run shot to right-center in the fourth helped Houston jump out to a 2-0 advantage before Hamilton's solo homer to right-center in the sixth trimmed the margin.

Game Notes

The Angels had never dropped their first five home games to start a season ... Starter Garrett Richards stepped in for an injured Jered Weaver and allowed four runs on three hits and three walks over 6 1/3 frames ... Astros starter Lucas Harrell gave up six hits over 5 2/3 innings.