Jets coach Adam Gase and Patriots offensive coordinator Josh McDaniels first met 20 years ago, when they both were on Nick Saban’s staff at Michigan State.

The two shared an apartment for a brief time there, along with current Bills offensive coordinator Brian Daboll. Ten years later, Gase worked under McDaniels, when he was the head coach with the Broncos, as the wide receivers coach.

On Sunday, the two will be on opposite sidelines as Gase faces the Patriots for the first time with the Jets. Gase took time this week to talk to The Post about McDaniels’ influence on him during their time in Denver.

“It completely changed my perspective on how to look at game-planning, coaching a position and understanding the big picture instead of just your position,” Gase said.

Gase started coaching under Saban. His next influence was Mike Martz, with whom he coached in Detroit and San Francisco. After that, he joined McDaniels in 2009 and saw a different way to approach the job.

“When I was with Martz, it was like my introduction to so much stuff,” Gase said. “I knew his system and how he did it. Mike was such a great teacher on all the positions. Mike coached almost everybody, where Josh would teach the coaches and the coaches would have to carry it to the players. You had to understand why we were doing it. I was with the wideouts and I had to understand, why was the protection doing this? Why was the back doing this? What was the quarterback thinking? We had to know so much. It completely opened up a world that I didn’t know about.”

That was Gase’s exposure to the system Bill Belichick created in New England and which is still going strong to this day.

“The more time I was with [McDaniels] and the more time I got to spend with him, it just clicked for me understanding why they did things when he was at New England and how they put their players in such a good position,” Gase said.

Though Gase never worked for Belichick, he has worked under two coaches who were heavily influenced by him with Saban, who was Belichick’s defensive coordinator with the Browns in the early 1990s, and McDaniels.

In 2017, McDaniels spoke about Gase to the Miami Herald.

“Hard worker. Highly intelligent. Fun guy. Good friend,” McDaniels said. “When we were in Denver together, grinding. There were no hours that were too long for Adam. If it meant putting in more, he did it.”

Gase has spent plenty of time grinding this week trying to figure out a way to beat his old friend.