The New York Giants and defensive end Jason Pierre-Paul have agreed to a four-year contract, the team announced Friday.

Pierre-Paul received a $62 million contract with $40 million guaranteed, a source told ESPN. The total value of the deal could reach $66 million if incentives are met.

"This is where I wanted to be," Pierre-Paul said. "I couldn't imagine me being anywhere else. I'm back for four years, and I'm ready to get after it.

"It means a lot to me, because I started here, and obviously I want to finish here. I've seen a lot of guys come and go, especially in my [draft] class. I'm the only one left in my class here. It means a lot. We won a Super Bowl here, and I'm looking forward to putting a fifth trophy in the case."

The NFL Network first reported the terms of Pierre-Paul's contract.

The Giants used the franchise tag on Pierre-Paul last month for a one-year contract worth $16,934,000. The new deal should offer some salary-cap relief to the Giants, who were just $3,918,376 under the cap as of Friday morning, according to NFL Players Association records.

Only two teams, the Los Angeles Rams and the Detroit Lions, had less cap room before this agreement.

Pierre-Paul, a two-time Pro Bowler, posted a photo on Instagram of him signing his new contract.

He also tweeted that the deal was official after initially casting doubt on the reports earlier Friday that he had reached an agreement with the Giants.

Pierre-Paul had been craving long-term security as he enters his eighth season with the Giants.

"I'm not playing on no one-year deal," he said after missing the Giants' season-ending loss to the Green Bay Packers in the playoffs following sports hernia surgery. "I've proved it. I've showed it. There is not really another guy like me out here doing it with seven and a half fingers still."

Pierre-Paul, 28, re-established himself last season after a fireworks accident on July 4, 2015, that cost him his right index finger and parts of several others. He had seven sacks in 2016 and was tied for the NFL lead with eight batted passes before the sports hernia surgery ended his season early.

Despite some doubts that he would ever approach his previous form, Pierre-Paul was strong against the run and as a pass-rusher last season despite his limitations. He believed it was enough to earn him the long-term deal he had been seeking for several years.

Pierre-Paul was given the franchise tag in 2015, before the fireworks accident. He played the 2016 season on a one-year deal worth just under $10 million.

A 2010 first-round pick out of South Florida, Pierre-Paul was a key member of the Giants' Super Bowl XLVI team. He had 16.5 sacks in 2011 to earn an All-Pro nod.

"We're happy to get a long-term deal with Jason," general manager Jerry Reese said in a statement. "Not only is he one of our best players, he is one of our leaders."

The Giants also announced Friday that they had re-signed quarterback Josh Johnson and guard John Jerry.