During Dan D’Antoni’s three-plus seasons as a Knicks assistant coach, and even back in Phoenix before the 2007 NBA Draft, he lobbied for Ramon Sessions.

D’Antoni is long gone and now head coach at Marshall, his alma mater, but Sessions is finally a Knick.

D’Antoni, Rockets coach Mike D’Antoni’s brother, has known Sessions since he was 12 years old when he played for the AAU program he ran in Myrtle Beach, S.C.

Sessions, 31, agreed to terms on a one-year veteran’s minimum deal at $2.1 million Friday — or eight years after former general manager Donnie Walsh once offered him a four-year, $24 million package. The Post first reported the Knicks’ interest in Sessions last month.

“We were trying to get him with the Knicks back then,’’ D’Antoni told The Post. “We were trying to establish that [speed-ball] offense in New York. And when [he] came out in the draft, we [Phoenix] had the 29th pick. I told Phoenix they ought to take him, he’d be in the league a long time and he’d run our offense better than a lot of people. They didn’t do it.

“He’s an extremely good person and an extremely good for creating pace for offense and reading the floor if they open the floor a bit.”

That’s Knicks coach Jeff Hornacek’s plan. As head coach in Phoenix, Hornacek attempted to duplicate Mike D’Antoni’s pioneering attack. With Phil Jackson’s triangle dead and buried, Hornacek wants to recreate the Suns’ offense.

Dan D’Antoni has brought a high-speed attack to Marshall, which went 20-15 last season and came within four points of winning the Conference USA title.

“Ramon gives the ball up, he gets it to the right spot first but he’s capable of taking it to the basket,’’ D’Antoni said. “But he spreads the ball around and keeps the flow. The coach is going to enjoy him on the team. He’s very good at spreading the floor.’’

No longer in the heart of his prime, Sessions missed the final 31 games with a torn meniscus last season for Charlotte, which declined his team option of $6.2 million. It was the first significant injury of his career and he finished the season with disappointing numbers.

Sessions averaged a career-low 16.2 minutes, 6.2 points (second-fewest of his career) and 2.6 assists (a career low). His field-goal percentage (38 percent) was second-lowest of his career.

Still, the Knicks chose Sessions over Derrick Rose and younger up-and-comer Donald Sloan, who may replace Sessions in Charlotte, according to a source.

Seeing the floor was the problem Hornacek had with Rose, who often barreled to the basket, head down, without seeing open teammates. Sessions and D’Antoni remain close as he has come to Marshall to conduct clinics.

“He’s a very knowledgeable basketball player who understands,’’ Dan D’Antoni said. “He’ll be a great fit, a great pick-and-roll guy and keeping the floor spread and delivering pass in corners through penetration. And he knows how to throw the hockey assist, to keep the offense moving. He’s good at that. They got a great get.’’