The quarterback has agreed to terms with the New York Giants, pending passing a physical, a person with knowledge of the decision told The Associated Press on Friday.

Like receiver Brandon Marshall last week, Smith is leaving the Jets but remaining in the same stadium. The person spoke on condition of anonymity because the deal has not been announced.

The 26-year-old Smith was a second-round draft choice by the Jets in 2013, but his stint with them was marred by injuries and inconsistency. He also lost his starting job in 2015 after then-teammate IK Enemkpali broke Smith’s jaw with a punch during training camp.

When Smith did get onto the field last season, it was brief. Ryan Fitzpatrick was benched for poor play, but Smith tore his right ACL in the second quarter against Baltimore and was done for the season.

That was his first start since 2014.

Smith will be a backup to Eli Manning, of course, and considering that Manning doesn’t miss games, his role might not include much field time for the Giants.

Marshall left the Jets for the Giants and got a two-year, $12 million contract.

Giants re-sign JPP

The Giants are convinced star defensive end Jason Pierre-Paul is fully healed from a fireworks accident that severely damaged his right hand.

They believe that so much that they have given JPP a four-year contract worth about $68 million.

“This is where I wanted to be,” Pierre-Paul told the Giants website Friday. “I couldn’t imagine me being anywhere else.”

Two summers ago, on July 4, Pierre-Paul’s right hand was severely damaged in a fireworks accident in Florida. He missed the first half of that season, but returned for the final eight games. He started all 12 games he played last year and has a strong finish as the Giants made the playoffs.

The 28-year-old Pierre-Paul said: “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,” the two-time Pro Bowler said. “I’ve seen a lot of guys come and go, especially in my (2010 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 team gave Pierre-Paul the franchise tag last month for the second time in three years.

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

Jets, McCown meet

Josh McCown might be the answer — in the short term, at least — for the quarterback-needy Jets.

The free agent QB is meeting with New York on Friday and Saturday, according to a person with direct knowledge of the situation.

The Jets have just the inexperienced Bryce Petty and Christian Hackenberg on their roster, and McCown would provide a veteran presence who could potentially start and be a mentor to the youngsters. Ryan Fitzpatrick and Geno Smith are both free agents and Smith has agreed to terms with the Jets’ New York neighbors, the Giants, pending passing a physical.

The person spoke to The Associated Press on condition of anonymity because the team had not announced the visit.

NFL Network first reported McCown’s scheduled meeting with New York.

McCown, who’ll turn 38 on July 4, played the last two seasons with Cleveland. He appeared in 13 games for the Browns, throwing for 3,209 yards, 18 touchdowns and 10 interceptions. But McCown was 1-10 as a starter with the Browns, including 0-3 last season, and was released last month.

The well-traveled McCown has also spent time with Arizona, Detroit, Oakland, Miami, Carolina, San Francisco, Chicago and Tampa Bay — all primarily as a backup.