The moment Mike Francesa stomped back onto the air at WFAN, the trio of Chris Carlin, Maggie Gray and Bart Scott were on the clock.

In fact, there were those high up at WFAN’s parent company, Entercom, who wanted to let the trio go entirely in May 2018, according to sources.

They survived then, but it was a matter of when, not if, something was going to happen.

Carlin, Gray and Scott all have contracts Entercom could escape from by the end of the year. The company had choices. Carlin was chosen as the odd man out, as he announced on social media Wednesday.

Gray and Scott are expected to remain with WFAN for the rest of this year and beyond, according to sources. Nothing is official yet.

Entercom executives have totally fallen for Francesa’s bully act. He tricked them with his unsigned contract gambit and is more in charge than ever, according to sources. That’s a good job out of you, Mikey.

For the fall, CMB will become MB, preceded by Boomer and Gio in the morning, Joe & Evan in midday and Francesa in the afternoon.

After the new year, the lineup will be based on what Francesa decides. A week ago, when Francesa’s app officially failed — err, was purchased by Entercom — The Post reported Francesa was contemplating moving most of his content to Radio.com.

Two separate sources, however, warned that Francesa is just nutty enough to change his mind because The Post has reported the potential plan.

Entercom, meanwhile, is a struggling company. The whole radio industry is annoyed by its efforts to lower broadcasters’ salaries. Its stock price is bottoming out.

It can’t even connect to the internet: The entire company has been without email since the weekend, as RadioInsight.com first reported.

So once Entercom gets up and running online, it may be able to finalize the future lineup.

That will not include Carlin, which really isn’t his fault. If WFAN had not been overtaken by Francesa’s world, CMB likely would have been deemed a success.

After struggling and losing to ESPN New York’s “The Michael Kay Show” at the beginning of 2018, Francesa stole CMB’s afternoon mics because, remember, he wanted to promote his upcoming app.

With Francesa back, CMB moved to the 1-3 p.m. slot and formed a strong bond that was evident in Carlin’s going-away note on Twitter, in which he especially praised Gray and Scott. The trio had strong ratings, too.

Carlin has had a pattern of success in his career, from being the voice of Rutgers to SNY studio work to Philadelphia talk radio and now back at the FAN.

But he had a falling out with Francesa. When Chris Russo split with Francesa and went to SiriusXM, Francesa thought Carlin, their former producer, sided with Mad Dog.

Just prior to Francesa’s return in 2018, Francesa and Russo had a giggle about WFAN’s ratings demise on Mad Dog’s MLB Network show, “High Heat.” Carlin sent an explicit — fellatio-related — text to the duo.

If you haven’t heard, Francesa can be a vindictive sort. It is not known if he helped push Carlin out, but not having Francesa on his side couldn’t have helped.