The Beard is back.

The Jets and Ryan Fitzpatrick agreed to a one-year, $12 million deal on the eve of the team’s first training camp practice Wednesday night, according to a source, ending their months-long standoff.

It had appeared the Jets were going to open training camp with Geno Smith as their starting quarterback as there were no signs of progress in the negotiations until late Wednesday, when the negotiations gained momentum and ultimately led to the deal.

The Jets had offered Fitzpatrick three separate deals months ago, one being a one-year, $9 million offer. The two sides had no recent talks, according to a source, until Wednesday, when the Jets increased the offer to $12 million for one year. It also includes $3 million in team-based incentives that could push the value to $15 million.

The Jets gave Fitzpatrick until 7 p.m. Wednesday, when the team held its first meeting, to agree to the deal. The agreement came shortly before 7.

Neither side won big in this negotiation, but Fitzpatrick and agent Jimmy Sexton get a slight edge. Fitzpatrick is betting on himself with the one-year deal. If he can duplicate the success he had in 2015, he can cash in next year with the Jets or with someone else. He got the Jets to raise their offer from the $8 million-$9 million average they had been on for months. Fitzpatrick gave a little too, though. The Jets had offered a three-year, $24 million deal with $16 million guaranteed. He gives up $4 million guaranteed and could lose on that bet on himself and not be able to make what the Jets were offering for 2017 and 2018. Fitzpatrick balked at that deal because the final two years called for him to be paid $6 million in each of them after $12 million this year.

Fitzpatrick had been willing to take a one-year, $12 million deal, but the Jets were not interested until recently. Getting a long-term deal done with Muhammad Wilkerson two weeks ago cleared $5.7 million in salary-cap space, creating some flexibility for them to get a one-year deal done. They still will need to make some moves to get enough cap space, but they can restructure a few contracts to get it.

Getting Fitzpatrick back in the building makes the Jets complete again. All offseason the absence of Fitzpatrick has been the cloud hanging over the team. On Wednesday when the players reported to camp, they faced questions about Fitzpatrick from the media and were told not to talk about him. If the standoff dragged into camp, it threatened to be a massive distraction.

Fitzpatrick, 33, returns to the offense he guided to a franchise-record 31 touchdowns in his first season with the Jets. He took over last August after Smith had his jaw broken by teammate IK Enemkpali in a locker-room fight. He took the team to a 10-6 record and led an offense that was No. 10 in the NFL. He threw for a career-high 3,905 yards and had a great rapport with wide receivers Brandon Marshall and Eric Decker.

The downside of the 2015 season for Fitzpatrick came in the final game, when he threw three interceptions against the Bills in a loss that kept the Jets out of the playoffs.

The negotiations were expected to be fairly easy between the team and Fitzpatrick because both sides openly said they wanted to stay together. It became clear when talks began, though, that the two sides were wide apart. Fitzpatrick wanted to be paid on par with other veteran starting quarterbacks, who were making $15 million and up. The Jets were hesitant to hand that kind of money to a journeyman quarterback who had one good season.

The drama continued all spring and into the summer, but the possibility of starting training camp without each other brought the sides to the negotiating table to get it done Wednesday.

As for Smith, now he slides into the backup role behind Fitzpatrick, a cruel fate for him after spending the entire offseason as the starting quarterback. It shows the Jets clearly had no faith in Smith despite their public proclamations they did.

The Jets now will try to break their five-year playoff drought with Fitzpatrick at the controls. The incentives in his contract likely have something to do with just that since Fitzpatrick has never made the playoffs in his 11-year career.