Devin McCourty

New England Patriots football free safety Devin McCourty smiles during a news conference in Foxborough, Mass., Friday, Jan. 23, 2015. The Patriots face the Seattle Seahawks in Super Bowl XLIX on Sunday, Feb. 1, 2015, in Glendale, Ariz. (AP Photo/Elise Amendola)

Well, you can't say the Eagles didn't try.

The team made an all-out push for safety Devin McCourty on Sunday prior to the free-agent re-signing with the New England Patriots, according to a person with knowledge of the situation who requested anonymity.

The Eagles were willing to pay more than the Patriots were, and the team made it clear they would top the Patriots' offer of five years and $47.5 million.

McCourty was close to signing with the Eagles, and had he not picked the Patriots, he would be on his way to Philadelphia, the person said, despite interest from the Giants and Jacksonville Jaguars.

Ultimately, however, the McCourty gave the Patriots a hometown discount (despite the being from New York).

After losing out on McCourty, the Eagles must continue to look for a safety to replace free agent Nate Allen. The possibility of Allen returning hasn't been officially ruled out, however.

The Eagles have made a strong effort to improve their secondary this season: The unit finished 31st in the NFL last season against the pass, allowing 264 yards per game. They have already added one piece in free agent cornerback Byron Maxwell, but likely are still searching for a safety and another starting corner.

Even with the signings of Maxwell, running back Frank Gore and quarterback Mark Sanchez, the Eagles still have plenty of cap space.

The bad news? Some players, like McCourty, aren't taking it.

Eliot Shorr-Parks may be reached at eshorrpa@njadvancemedia.com. Follow him on Twitter @EliotShorrParks. Find NJ.com Sports on Facebook.