The Timberwolves’ search for a new coach veered wildly Sunday, when both the Memphis Grizzlies and his agent said coach Dave Joerger will remain where he is and won’t come home to Minnesota.

Saturday, Joerger interviewed in Minneapolis for 2½ hours with Wolves owner Glen Taylor after the team last week received permission from the Grizzlies to talk with him about replacing retired coach Rick Adelman.

On Sunday, Joerger decided to remain in Memphis after Robert Pera, the Grizzlies’ mercurial, 36-year-old owner, reached out to Joerger and made it clear the Grizzlies intend to keep the coach contractually obligated to them for the next two seasons.

With star Kevin Love’s future in Minnesota in doubt, the Wolves now will resume a search process that has included interviews with, among others, former Toronto coach Sam Mitchell, who is a former Wolves forward, and Lionel Hollins, whom Joerger replaced in Memphis last summer.

Joerger, 40, grew up in Staples, Minn., attended college in Moorhead and labored in basketball’s minor leagues — where he won five titles in seven years — for a decade before the Grizzlies hired him as an assistant coach in 2007 and promoted him to the head coach’s job a year ago.

He led the Grizzlies to a 50-32 record and a first-round, seven-game playoff loss to Oklahoma City in his first season as an NBA head coach.

“This is where I want to be,” Joerger told the Memphis Commercial Appeal on Sunday evening. “I have a lot invested here. This feels good. I’m really, really, excited. We’re going to be fine.”

According to NBA sources, Pera improved Joerger’s contract and assured him his future remained in Memphis after the Wolves and Grizzlies likely had differing ideas about what compensation, if any, would be due should the Wolves hire a coach still under contract.

Pera took to Twitter on Sunday to answer questions from Grizzlies fans mystified by a week’s events in which their team made sweeping front-office changes that appeared for a time to include their head coach next. The Commercial Appeal reported Joerger spent Sunday talking by phone with Grizzlies players.

In his Twitter answers, Pera said his conversations with the Wolves never got as far as the compensation matter. The Grizzlies likely would have asked for a swap of first-round draft picks as well as an additional pick(s) while the Wolves seemed unwilling to offer anything for a coach who appeared on his way out in Memphis.

When asked about the compensation issue Saturday night, Wolves owner Glen Taylor replied by wondering what the Grizzlies would offer his team.

Flip Saunders, the Wolves president of basketball operations, declined to comment — as he has throughout the coaching search process — except to say, “We were going through the interview process and we had good talks, but it became very apparent to both parties that Dave was going to remain in Memphis.”

Saunders interviewed Joerger for the job on Thursday before bringing him to Minneapolis on Saturday to talk with Taylor and other Wolves officials.

Pera bought the Grizzlies in 2012, but he tweeted that, as improbable as it seems, had never “really talked” 1-on-1 with his coach before this past weekend.

“I think Dave is a great coach, but personnel has to want to be in Memphis,” tweeted Pera, a former computer hardware engineer who said he couldn’t afford an apartment eight years ago and now is a self-made billionaire. “I know now Dave 100% wants to be here.”

Joerger called his weekend conversations with Pera “open and honest.” Pera likely sweetened Joerger’s contract either with a raise or by guaranteeing its final season.

“What’s between Robert and I now is like WOW,” Joerger told the Commercial Appeal. “This is how it’s supposed to be. There’s interaction and you talk about anything. … All the cards were on the table. The guy wants to win. You could feel it come through the phone.”