Plan B it is.

The Jets saw top free agent quarterback target Kirk Cousins go to the Vikings on Tuesday for a record-breaking contract. They moved on to their fallback option — agreeing on a deal to bring back Josh McCown and another deal to sign former Vikings first-round pick Teddy Bridgewater.

The Jets were all-in on Cousins and made him a big offer on Monday, believed to be more than the three-year, $84 million fully guaranteed deal he got from the Vikings. But once he decided to visit Minnesota first, the Jets knew they were out. Cousins can officially sign the contract on Wednesday when the new league year opens.

After getting rebuffed by Cousins, the Jets quickly moved on to bringing back McCown. A source said he agreed to a one-year, $10 million deal. McCown, who will be 39 in July, had a strong season for the Jets in 2017, throwing for a career-high 18 touchdowns.

The Jets did not stop there, though, later agreeing on a one-year deal with Bridgewater, according to a source. Bridgewater has missed most of the past two seasons after a gruesome knee injury, but the Jets must be banking on him being fully healthy again. Hid deal is for roughly $5 million, according to multiple reports.

While McCown is the Jets’ own free agent, he can sign his deal at any time. Bridgewater must wait until 4 p.m. Wednesday.

A source said the Jets told McCown that he will enter the offseason as the starter, which is consistent with what Todd Bowles has done in the past for incumbents.

McCown had to wait for Cousins to land somewhere before getting a deal to return to the Jets.

“It was a crazy process but obviously for me to be able to come back, I’m excited about that,” McCown told The Post in a phone interview. “I’m just looking forward to being able to continue to build with these guys and the chemistry and all that. I’m excited about being back.”

Bridgewater is a fascinating signing. Since suffering a gruesome knee injury in August 2016, Bridgewater has not played other than some garbage time at the end of Week 15 in December.

The 25-year-old could be a steal for the Jets if he recovers from the knee injury. He was a first-round pick of the Vikings in 2014 and made the Pro Bowl in 2015, a season in which the Vikings went to the playoffs.

The Jets could also take a quarterback in the first round of next month’s draft, setting up a quarterbacks room of McCown, Bridgewater and a rookie. That would give the rookie time to develop and the Jets could start with McCown unless Bridgewater is healthy and can win the job in training camp.

For McCown, it was the end of an interesting process. He and Cousins have the same agent, Mike McCartney. McCown knew the Jets had a strong interest in Cousins and he had to wait it out. He said he knew when developments happened with Cousins from McCartney but tried not to ask too much to respect their relationship.

“I just knew that [Cousins] was kind of the prize, so to speak,” McCown said. “Everybody was going after him. I was just kind of waiting and being patient. It seemed like everybody kind of had their order of what they were going to do if they got Kirk and if not what would they do, what was Plan B. It was a matter of waiting that out.”