PHILADELPHIA -- It didn't take general manager Pat Gillick long to find a closer to replace Billy Wagner.

Gillick confirmed Friday that Tom Gordon has agreed to terms on a three-year deal with an option for a fourth. The contract, which is worth a reported $18 million, is still pending the results of a physical, which Gordon is expected to undergo Saturday.

Gordon, 38, was the setup man for the Yankees' Mariano Rivera the past two seasons. In 2005, Gordon appeared in 79 games and compiled a 2.57 ERA. Opponents hit just .203 against him.

In 80 2/3 innings, Gordon allowed 59 hits and struck out 69. He also allowed eight home runs, the most he has given up since 1997.

"[Gordon] is in great shape," Gillick said, referring to Gordon's age. "This guy is in tremendous condition. He also spent two years with Rivera, where he was given a lot of tips and advice on the mental approach to closing. I think he's helped Tom a lot. Tom referred to that in speaking to me.

"Right now, we don't see any decline in his talent."

Gillick is generally opposed to long-term contracts, but he had no problem with offering Gordon a three-year deal.

"It's kind of a gut call," Gillick said. "On Gordon, the market dictated to go a little further than what you wanted to do."

Gordon, who recorded 46 saves for the Red Sox in 1998, hasn't been a full-time closer since '01. He is expected to take on the role formerly held by Wagner, who left the Phillies to join the Mets earlier this week.

The Phillies also announced that they have released pitchers Pedro Liriano and Franklin Perez.