HOUSTON -- The Los Angeles Angels protested Thursday night's game against Houston and then beat the Astros anyway.

Mark Trumbo hit a two-run double in the eighth inning before Alberto Callaspo's go-ahead sacrifice fly sent the Angels to a 6-5 victory in a game that lasted more than four hours.

"It was huge," Trumbo said. "It was a draining game. It was over four hours. We battled our hearts out and (we) like the way it went, especially going into a new series. This is what we're going to have to do. They're not going to be easy and if this is indicative of what we're going to do, we've got to do it."

The struggling Angels snapped a four-game skid and avoided an embarrassing sweep against last-place Houston, which has a payroll that's more than $100 million lower than Los Angeles' ledger.

The game took 4 hours, 7 minutes -- making it the longest nine-inning contest in the majors this season, according to STATS. It also was the longest nine-inning game in Minute Maid Park history.

Josh Hamilton and Brendan Harris homered for the Angels, who have won just three of their past 12 road games.

The Angels felt lucky to escape with a win after leaving 16 on base and going 1-for-13 with runners in scoring position.

"There aren't many games you're going to win when you leave 16 guys on base," manager Mike Scioscia said. "It's a great character game for our guys. I feel good for them. The clubhouse feels good. We held on. We kept pressuring them and got some key hits as the game went on."

The dispute came with two outs in the seventh inning when Astros reliever Wesley Wright ran onto the mound and threw several warm-up pitches before rookie manager Bo Porter raced onto the field between the mound and home plate to stop him from throwing more.

Hector Ambriz soon jogged out of the bullpen and onto the mound, and Wright headed to the dugout.

Scioscia ran onto the field and argued that Ambriz shouldn't be able to enter the game because Wright didn't face a batter. Scioscia remained on the field for several minutes while the umpires huddled and discussed the situation.

"My contention was that the pitcher came in, had to face one batter," Scioscia said. "I protested, and we're happy we won (the game)."

Crew chief Fieldin Culbreth wouldn't say much about the situation.

"Well, the only thing I can tell you is that all matters concerning protests are handled through the league office," he said.

Pinch hitter Luis Jimenez was in the on-deck circle when Wright went to the mound but was replaced by Scott Cousins when Ambriz came on.

The umps eventually allowed Ambriz (0-2) to remain in the game. He retired Cousins to end the inning.

"Technically, Wesley came in to face the batter that was scheduled to hit, but he pinch-hit for the batter that was scheduled to hit, which my understanding of the rule means you can now bring in another pitcher to face the pinch hitter," Porter said.

Scioscia lodged an official protest that he said became moot when the Angels rallied to win.

Trumbo tied it at 5 with a bases-loaded double down the right-field line with nobody out in the eighth, chasing Ambriz. He was replaced by Travis Blackley, who intentionally walked Howie Kendrick with one out before Callaspo's sacrifice fly.

Garrett Richards (2-3) pitched a scoreless seventh for the win and Ernesto Frieri got five outs for his fifth save.

Houston had runners at second and third with one out in the eighth, but the Astros came up empty after Matt Dominguez struck out and pinch hitter Carlos Pena grounded out.

Dominguez put Houston on top 5-3 in the sixth with a two-out, two-run single that chased starter Jason Vargas.

The left-hander, who was coming off consecutive complete games, yielded 10 hits and five runs in 5 2/3 innings.

Jose Altuve added three hits for Houston to raise his average to .345, and Chris Carter and Brandon Barnes each drove in a run for the Astros. Dominguez made three errors at third base after entering the game with one all season.

Houston starter Lucas Harrell yielded four hits and two runs, but walked six in five innings.

Paul Clemens replaced Harrell to start the sixth and Harris connected on his third pitch for a homer to center that tied it 3-all.

Hamilton, who broke a 20-game home run drought with a solo shot Wednesday, opened the second inning with a drive to the bullpen in center field to make it 1-0.

Dominguez tied it with an RBI single in the bottom half.

Game notes

Scheduled starter Tommy Hanson won't go for the Angels on Friday at the Chicago White Sox as he continues to deal with a recent death in his family. Scioscia said the team would announce a replacement Friday. ... Los Angeles reliever Scott Downs left in the eighth with a right foot injury, and Scioscia said after the game that it was very sore. ... Angels shortstop Erick Aybar left in the fourth because of tightness in his right hamstring. He was replaced by Harris. Aybar went 0-for-3, ending an 11-game hitting streak. ... Chris Iannetta walked a career-high four times. ... Los Angeles reliever Ryan Madson, who missed last season after Tommy John surgery, threw 21 pitches in a camp game at extended spring training. Scioscia said Madson will probably pitch in two games there before moving to the Class-A California League to continue his work. "His stuff looked good, so it's a first step," Scioscia said. Madson is scheduled to throw again on Saturday.