Updated

Brett Myers nearly stuck it to his old team on opening day.

Myers outdueled Roy Halladay and turned a two-run lead over to the bullpen, only to see the Philadelphia Phillies rally for three runs in the bottom of the ninth inning Friday to beat the Houston Astros 5-4.

John Mayberry Jr. lined an RBI single off closer Brandon Lyon that capped that comeback and spoiled Myers' outing.

"They're a good team. That's how it goes sometimes," Myers said.

Trailing 4-2 to start the ninth, the Phillies got going when Jimmy Rollins and Ryan Howard started with singles off Lyon (0-1). After Raul Ibanez popped up, Rollins stole third and Ben Francisco lined an RBI single. Carlos Ruiz followed with a single and Wilson Valdez hit a tying single that kept the bases loaded with one out.

Mayberry then sent a shot over drawn-in center fielder Michael Bourn, kicking off a celebration after he touched first base. He then got a shaving cream pie in the face during a postgame interview.

"I felt real good. I just didn't make the pitches I needed to make," said Lyon, who was 20 for 22 in save chances last year. "I'll just learn from this."

Ryan Madson (1-0) earned the win with a scoreless inning in relief.

Myers, the Phillies' opening-day starter from 2007-09, allowed two runs — one earned — and three hits in seven innings.

Sporting a long, bushy goatee, Myers threw just 85 pitches, partly because he didn't have any strikeouts. The Phillies didn't even swing and miss against him until the seventh, but they didn't hit the ball too hard despite making plenty of contact — until the ninth.

"I didn't pay attention to the pitch count," Myers said. "I could have gone to 120 if I had to."

Halladay, the reigning NL Cy Young Award winner, allowed one run and five hits, striking out six in six innings. Myers had two of those hits.

Halladay didn't get much support from an offense that's missing No. 3 hitter Chase Utley (injured) and former No. 5 hitter Jayson Werth (signed a $126 million deal with Washington).

Myers had something to do with that. He picked up where he left off last year. A former first-round pick by the Phillies, Myers was 14-8 with a 3.14 ERA in his first season with the Astros, and pitched at least six innings in 32 of his 33 starts.

"I can't say enough about how he pitched," Astros manager Brad Mills said.

The four-time NL East champion Phillies became instant favorites to win their second World Series title in four years after signing Cliff Lee in December. But injuries took a toll in the spring and they entered the season without Utley, their five-time All-Star second baseman, and closer Brad Lidge.

They're going to need more production from a lineup that features two former MVPs and five former All-Stars to avoid having dramatic finishes.

Valdez, filling in Utley, and Francisco, taking Werth's place for now, delivered key hits in the ninth.

The Astros broke through against Halladay in the sixth. Angel Sanchez led off with an infield single on a slow grounder that rolled under second baseman Valdez's glove. Hunter Pence followed with a double off the fence in right-center. Sanchez scored on Bill Hall's one-out groundout to give Houston a 1-0 lead.

Halladay departed after that inning and the Astros tacked on three more runs in the seventh. Brett Wallace singled off reliever J.C. Romero, and reliever David Herndon allowed a single to Humberto Quintero. After Myers sacrificed, Bourn hit a triple to right-center for a 3-0 lead. Sanchez followed with a sacrifice fly to make it 4-0.

The Phillies cut the deficit in half in the bottom half. Placido Polanco walked, Rollins singled and they advanced on Quintero's passed ball. A sacrifice fly by Howard and RBI groundout by Ibanez got the Phillies within 4-2.

Halladay struck out five of the first eight batters he faced and didn't allow a runner until Myers punched a single to center in the third. Myers' hit surprised even his teammates, who chuckled in the dugout.

Myers got another one his next time up, too. With two outs in the fifth, Quintero reached second when right fielder Francisco dropped his liner for an error. Myers then lined a single to right, but Quintero held up. Halladay escaped the jam by retiring Bourn on a fly to deep right.

Halladay won 21 games in his first season with the Phillies, including a perfect game. He then tossed a no-hitter in his first career postseason start.

A crowd of 45,237 was the 124th consecutive regular-season sellout at Citizens Bank Park.

NOTES: Mills said J.A. Happ will make his scheduled start on Sunday. Happ strained a muscle in his side in a start on Tuesday night. ... Myers was Houston's first opening-day starter other than Roy Oswalt, currently on the Phillies, since Wade Miller in 2002.