HOUSTON (AP) -- Carlos Lee spoiled the Houston homecoming for Roy Oswalt and Hunter Pence .
He hit a two-run homer off Oswalt and the Astros beat the Philadelphia Phillies 5-1 Monday night. Oswalt tried to sneak a curveball past his former teammate.
"I was trying to throw it down and away," Oswalt said. "I had two strikes on him, and I thought I could throw it down and away for a strike, but he popped it up and it went out. Crawford seats got me here before. I knew it wasn't going very far - front row. He hit it far enough to get out."
Despite the loss, Philadelphia's magic number for gaining at least a wild-card playoff spot dropped to one with St. Louis' 6-5 loss to Pittsburgh. The Phillies are trying to make the playoffs for the fifth straight year. They won the World Series in 2008 and lost in it in 2009.
Oswalt (7-9), who pitched 10 seasons for the Astros, faced his former teammates for the first time at Minute Maid Park since he was traded to the Phillies in July 2010.
Pence, traded by Houston to the Phillies in July, got two hits off Brett Myers (5-13).
Both Oswalt and Pence received warm ovations on their first plate appearances.
"I didn't expect it to feel as weird as it did," Pence said. "It was strange. The support they gave me was incredible. I'm not sure I was expecting that, but it was humbling. It was familiar but unfamiliar at the same time."
Myers allowed six hits in eight innings. He struck out four and walked one. Myers has allowed three earned runs in his last 22 2-3 innings.
"Sometimes you go out there and don't want to throw a pitch because they know it's coming or they have something on you," Myers said. "You just have to mix it up and keep them (as) off balance as possible."
Oswalt pitched seven innings, allowed five earned runs, struck out two and walked two.
J.D. Martinez got three hits and scored three runs for Houston. He opened the fourth inning with a double and scored on a single by Brian Bogusevic . Humberto Quintero 's double scored Bogusevic for a 2-1 lead.
Martinez singled with two outs in the fourth and scored on Lee's 16th homer into the Crawford boxes in left field for a 4-1 lead.
Martinez got his third hit off Oswalt in the seventh. After Oswalt hit Lee with a pitch, he scored on a grounder by Bogusevic.
"He's a guy that throws any pitch on any count," Martinez said. "We stuck with the approach and hit off his fastball and adjusted everything else. You never know what's coming off him."
Raul Ibanez doubled to open the second inning for the Phillies and he scored on a single by Pete Orr .
Oswalt had a club-record eight opening day starts for Houston, was named to the All-Star team three times and pitched the Astros to their only World Series appearance in 2005. Oswalt ranks first in Astros winning percentage at .636.
Pence hit .290 in five seasons with the Astros. Lee said he felt comfortable facing Oswalt.
"I've had about 25 at bats against him so I know what kind of pitcher he is," Lee said. "I got good at bats against him. We're hitting the ball good and giving ourselves opportunities to score some runs. Today, we got some key hits."
Notes: The Phillies have won six of eight, outscoring opponents 36-20. Philadelphia is 20-7 in their last 27 road games. They have baseball's best road record at 45-28. The franchise high mark for road victories is 48 in 1976 and 2009. Lee has hit safely in 20 of his last 21 games, including a season-high 14-game streak. The Astros avoided setting a franchise record for most losses in a season. They are tied for the record with 97 losses, set in 1965, 1975 and 1991.