Doug Marrone will be on the visitor’s sideline on Sunday at MetLife Stadium, leading the Jaguars. If things had gone differently two years ago, he might have been on the opposite sideline for this game.

The Jets nearly hired Marrone in 2015 before picking Todd Bowles. In fact, Marrone was the early leader to land the job. He had the support of the people running the search, former Jets players and was a favorite of owner Woody Johnson until a smear campaign by one media outlet doomed him.

After two years as a Jacksonville assistant coach, Marrone is back as a head coach and could make the Jets look foolish for passing on him when they did. He is only three games into his time as the Jaguars head coach, so it is too soon to know whether he will flop in Jacksonville, but the team is 2-1 and coming off a 44-7 win over the Ravens.

You might think 2-1 is no big deal, but the Jaguars have not been over .500 in Week 4 of the season since 2007, the last time they made the playoffs. Marrone and former Giants coach Tom Coughlin have teamed up to try to turn around one of the worst franchises in the league.

If Marrone can get the Jaguars straightened out, imagine what he could have done for the Jets.

There were whispers as soon as Rex Ryan was fired the Jets were interested in Marrone, who had been an offensive line coach for the Jets from 2002-05 and had support from former players like Curtis Martin and Kevin Mawae. He had just finished a 9-7 season with the Bills, his second in Buffalo. It was the lone winning season the Bills have had since 2004.

On New Year’s Eve, Marrone opted out of his contract with the Bills. Sources said he was confident he was going to land the Jets job. The team had communicated its interest in him through back channels. Johnson, worried the Jets would face competition for Marrone’s services, had his private jet ready to fly to Buffalo and pick him up that night. Johnson was even quoted saying what a positive development it was that Marrone was free.

When it became clear Marrone wanted the Jets as much as they wanted him, the two sides agreed to wait three days for the interview after Johnson and the search committee returned from a trip to Seattle.

In those three days, an agenda-driven series of articles appeared bashing Marrone through anonymous sources. One article popped up just before Marrone’s interview began on a Saturday afternoon in Florham Park. Sources said Johnson got spooked by the bad press. He fixated on the claims that had been made in the story, and spent much of the interview asking Marrone about the allegations instead of what he would do to fix the Jets.

Marrone walked out of the interview knowing he was not getting the job.

The plan had been to team up Marrone and Mike Maccagnan as coach and GM. The two have known each other since 1991 when Maccagnan was a scout and Marrone a player for the London Monarchs in NFL Europe. They later worked together in the Canadian Football League and stayed close through the years.

Both Charley Casserly and Ron Wolf, who were leading the search for the new coach and GM, were on board with the Marrone/Maccagnan pairing. Johnson, influenced by the negative articles, got cold feet.

The optics of Marrone walking away in Buffalo and then getting spurned by the Jets were tough to overcome for Marrone. He interviewed for a few other head coaching jobs that year, but ended up coaching the offensive line for the Jaguars.

When the team fired Gus Bradley last season, Marrone became the interim coach for two games and then was named the permanent coach.

Marrone brings his 2-1 team to MetLife on Sunday. On a conference call with New York reporters Wednesday, Marrone said he is over the rejection from the Jets.

“I have no feelings at all,” Marrone said.

If Marrone turns the Jaguars around and proves he is a good head coach, the Jets should have plenty of feelings about how they handled his candidacy in 2015, starting with embarrassment.