It took more than four hours of baseball, the last of which was played under protest, a dramatic three-run, eighth-inning rally and the second five-out save from closer Ernesto Frieri in nine days, but the Angels finally did it.

They beat the Houston Astros.

Mark Trumbo, fighting off a tough outside fastball, blooped a tying two-run double to right field in the eighth, and Alberto Callaspo's sacrifice fly scored the game-winner Thursday night, as the Angels beat the Astros, 6-5, in Minute Maid Park, avoiding a three-game sweep at the hands of baseball's worst team.

The Angels lost shortstop Erick Aybar to a right hamstring injury and reliever Scott Downs to a right foot injury — neither injury is considered serious — and they went one for 13 with runners in scoring position, leaving 16 men on base.

Pitcher Tommy Hanson also left the team again because of issues related to the recent death of his 24-year-old stepbrother and was scratched from Friday night's scheduled start against the Chicago White Sox. The club did not announce a starter Thursday night.

But somehow, the Angels boarded a plane for a late-night flight to Chicago feeling a little better about themselves after winning for the fourth time in 15 games.

“There aren't many games you're going to win when you leave 16 on base, but it's a great character game for these guys,” Manager Mike Scioscia said. “They bounced back, got some key outs at the end, Ernie was terrific, and we held on.”

Had they not held on, there would have been many calls between the Angels and the commissioner's office Friday.

The Astros took a 5-3 lead in the sixth on Matt Dominguez's two-out, two-run single, but the Angels rallied in the seventh by putting two on with two outs against reliever Paul Clemens.

With left-handed-hitting J.B. Shuck coming up, Houston Manager Bo Porter pulled Clemens for left-hander Wesley Wright. Luis Jimenez, who bats right-handed, stepped into the on-deck circle while Wright was warming up.

Porter then jogged to the mound and summoned right-hander Hector Ambriz, which seemed a clear violation of Rule 3.05 (b), which states a substitute pitcher must face at least one batter unless he sustains an injury or illness.

Wright, who threw three warmup pitches, was not hurt. Scioscia, after a long argument with crew chief Fieldin Culbreth, filed an official protest.

“My contention was that the pitcher had to face one batter,” Scioscia said. “I protested. We're happy we won. I think the rule is pretty clear.”