The Philadelphia Phillies—only days removed from what some thought was a deal with their own free-agent closer, Ryan Madson—have reached a contract agreement with free-agent righthander Jonathan Papelbon, pending a physical, CSNPhilly.com reported, citing two people with knowledge of the situation.

Papelbon, who will be 31 on Nov. 23, has averaged 36 saves a year for the Boston Red Sox over the past six seasons.

The Phillies sign All-Star closer Jonathan Papelbon to a deal that is reportedly for four years. (AP Photo)

According to CSNPhilly.com, Papelbon, who will replace Madson as the Phillies’ closer, is likely to receive a four-year contract. Philadelphia signed Cliff Lee last offseason to a five-year contract, breaking the club's long-held policy against offering pitchers more than three years.

As of early Friday, ESPN.com reported that it was still unclear exactly what caused the Phillies’ negotiations with Madson and agent Scott Boras to break down over the past two days.

But, according to the website, Phillies GM Ruben Amaro Jr. vigorously denied an SI.com report that the two sides had agreed on a four-year, $44 million contract, pending the approval of team president David Montgomery.

Enter Papelbon, who ESPN.com noted is three months younger than Madson but has a six-year track record as a closer compared to one season for Madson and is widely looked at as the top closer on the market.

Papelbon has 219 career saves, compared with 52 for Madson, and his career ERA (2.33) and WHIP (1.02) are considerably better than Madson’s (3.59/1.29) despite Papelbon’s pitching his entire career in the powerful AL East.

Papelbon had a 2.94 ERA in 64 1/3 innings for the Red Sox in 2011, saving 31 games while averaging 12.2 strikeouts and 1.4 walks per nine innings.

He becomes the first Type A free agent to change teams this offseason, while a collective bargaining agreement is being negotiated under which compensation could change. Under current rules, Boston would get the Phillies’ first-round pick (31st overall) in the June 2012 draft unless the Phillies sign an additional Type A free agent with a higher ranking than Papelbon.

If the Phillies lose Madson to another team—which looks likely after Friday’s deal—after offering him arbitration, they would surrender one pick and gain two.