The feud between President Trump and Nancy Pelosi exploded into an exchange of reality-show-style insults on Thursday — with the president claiming “she’s lost it” and the House speaker calling for Trump’s family or staff to stage an ­“intervention.”

The duel of put-downs came amid a White House event to announce $16 billion in aid to farmers, when the president went off script and started questioning Pelosi’s mental fitness, while repeating his description of himself as an “extremely stable genius.”

“I’ve been watching her. I have been watching her for a long period of time,” he said. “She’s not the same person. She’s lost it.”

The president went on to say Pelosi doesn’t understand the United States-Mexico-Canada Agreement — his renegotiated version of NAFTA — and accused her of stalling its passage in the House.

“She’s a mess. Let’s face it. She doesn’t understand it. They sort of feel she’s disintegrating before their eyes,” Trump said of Pelosi. “Pelosi does not understand the bill . . . so she’s got to get up to snuff and learn the bill.”

Moments after Trump ended his remarks, Pelosi shot back on Twitter.

“When the ‘extremely stable genius’ starts acting more presidential, I’ll be happy to work with him on infrastructure, trade and other issues,” the California Democrat wrote.

Earlier in the day, Pelosi called on Trump’s inner circle to conduct an “intervention,” in response to an incident Wednesday when he abruptly ended a White House meeting on infrastructure and went to the Rose Garden to blast Democrats.

“​Another temper tantrum. I pray for the president of the United States. I wish that his family or his administration or his staff would have an intervention for the good of the country,” Pelosi said at her weekly ​briefing on Capitol Hill.

Trump — who spent more time slamming Democratic-led investigations into him than in laying out the aid package for farmers hurt by a trade dispute with China — also denied accounts that he stormed out of the meeting with Schumer and Pelosi.

“I walked out, I was so calm. You all saw me minutes later,” he told reporters in the room, referring to the news conference he gave after Wednesday’s scuttled meeting.

He then called on individual members of his administration who he said were at the confab to attest to his calm demeanor.

“Kellyanne, what was my temperament yesterday?” he asked White House counselor Kellyanne Conway.

“Very calm. No tamper tantrum,” she replied.

Next up was White House economic adviser Larry Kudlow.

‘You were very calm,” Kudlow ­responded. “Calmer than some of our trade negotiations.”

Trump claimed Democrats want to impeach him because they have never recovered from his stunning 2016 election win over Hillary ­Clinton.

“Well, Nancy Pelosi was not happy about it, and she is a mess,” he said.

He then compared her to presidential hopefuls Sen. Bernie Sanders and Beto O’Rourke.

“I don’t want to say ‘Crazy Nancy’ because if I say that you’re going to say it’s a copy of ‘Crazy Bernie’ and that’s no good. Because Bernie is definitely crazy,” Trump said.

“She was crazy yesterday with the hands, she reminded me of Beto, maybe a little bit worse,” he continued, waving his hands in the air to mock her movements.

Trump began the day tweeting that the Democrats were hell-bent on investigating him instead of working with him on legislation, branding them as the “DO NOTHING PARTY.”

“It is not possible for them to investigate and legislate at the same time. Their heart is not into infrastructure, pre-existing conditions and our great Vets​,” Trump posted on Twitter. “All they are geared up to do, six committee​s​, is squander time, day after day, trying to find anything which will be bad for me.​”

Pelosi at her Thursday briefing said her caucus can balance its congressional oversight of the White House and work with the president on important policy issues such as ­infrastructure.

​

“We can walk and chew gum at the same time,” she said. “We have a responsibility to find common ground.”