President Trump feared for weeks that ex-national security adviser Michael Flynn would flip and talk to the feds during their probe into the administration — and even took a thinly veiled jab at his former trusted aide in a Thanksgiving speech, according to a report Friday.

As it appeared that Flynn would deal with the feds, the president began privately fuming that his former aide “had turned on me,” an administration official and two outside allies of Trump told The Daily Beast.

Two of the sources said it sounded as if Trump felt betrayed that someone whom he admired professionally and liked personally had possibly flipped.

Sources told the outlet that Trump appeared to make a veiled jab at Flynn during his Thanksgiving speech to members of the US Coast Guard.

“You never know about an ally. An ally can turn,” Trump said, which the sources revealed was intended as a swipe at Flynn.