The Patriots and receiver Randy Moss finalized a three-year, $27 million contract today, ensuring that a key piece of the team's record-setting offense returns.

The contract includes a $12 million signing bonus and $15 million in guarantees, according to Moss's agent, Tim DiPiero.

"Randy is grateful to Mr. Kraft, Coach Belichick and Scott Pioli for agreeing to the terms of this contract," DiPiero wrote in an email to reporters. "Randy was serious about wanting to stay. Because of Randy's record-breaking year, the interest in him was very high. Randy took less than he could have to rejoin his teammates."

In a statement that confirmed Moss's re-signing, Patriots coach Bill Belichick touched on Moss's return.

"What Randy did for our team last year was outstanding," Belichick said in a statement. "He is one of our most consistent, competitive and team-oriented players and it is undoubtedly a relationship we are excited to continue."

On his website, therealrandymoss.com, Moss said: "I want to take time out to thank all of the fans for their support and for wishing me well in my return to New England. I'm ready to get back. We have some unfinished business to take care of."

The sides had been close since the start of free agency, having agreed on the overall value of the pact. The main sticking point was in the amount of guaranteed money included in the deal. However, there are indications Moss tested the free-agency waters.

The Philadelphia Daily News reported today that Moss spoke extensively with Eagles head coach Andy Reid about the possibility of signing with Philadelphia. Meanwhile, the Philadelphia Inquirer noted that the Eagles offered more than the three-year, $27 million contract that Moss signed with the Patriots, and "felt as if they were close to striking a deal with the star receiver before the news about the Patriots broke early this afternoon."

The Patriots have seen several players sign with new clubs through the first three days in free agency -- a group that includes cornerback Asante Samuel (Eagles), receiver Donte Stallworth (Browns) and cornerback Randall Gay (Saints) -- but their top priority remained Moss.

The first domino in the negotiation between the sides came when the Patriots elected to forgo placing the franchise tag on Moss last month, which would have restricted his ability to fully experience the open market.

In doing so, the Patriots sacrificed leverage but appeared to create a positive negotiating climate. However, when the first three days of free agency passed without an agreement, it was natural to wonder if perhaps the team's approach had backfired.

The receiver market exploded early in free agency, which could have been a factor in the delay in striking a deal. Talks between the sides heated up today.

Moss, who turned 31 last month and enters his 11th NFL season, said several times last year how much he enjoys playing with quarterback Tom Brady. He has privately wondered to friends how his career would have unfolded had he hooked with Brady and the parts the Patriots have assembled around the star quarterback earlier.

In his first year with the Patriots last season, Moss set a NFL record with 23 touchdown receptions. He totaled 98 catches for 1,493 yards, playing in a whopping 88 percent of the team's snaps. His presence alone generally dictated how defenses defended the Patriots.

In another move today, the Patriots agreed to a two-year contract with former Bills receiver Sam Aiken, who is considered a solid special teams performer.

© Copyright 2008 Globe Newspaper Company.