The president’s top economic adviser cut off a lengthy phone conversation with a long-winded President Trump by telling the commander-in-chief that he was “brilliant,” faking a bad connection and hanging up.

Gary Cohn was in a phone meeting at the White House with Sen. Tom Carper (D-DE), other lawmakers and administration aides Marc Short and Sahira Knight when suddenly Cohn got a cell phone call from Trump, who was on tour in Asia.

“About 30 minutes into the call, Gary gets up and takes a call on his cell phone, comes back into the room, and says, ‘We have somebody calling in from Asia,’ and it was the president, which was nice. Nice of him to do that,” Carper told CNN.

“Fifteen minutes later, the president is still talking,” he added.

“I said, Gary, why don’t you do this, just take the phone from, you know, your cell phone back and just say, ‘Mr. President, you’re brilliant! But we’re losing contact, and I think we’re going to lose you now, so good-bye.’ And that’s what he did and he hung up.”

Asked to confirm that Cohn faked a bad connection to duck the loquacious president, Carper said he didn’t want to get Cohn in trouble with Trump — but spilled the beans anyway.

“Well I wouldn’t — I don’t want to throw him under the bus, but yes. Seriously, he did,” he said.

The conversation, on tax reform, continued after Cohn hung up, he added.

“Senator Carper’s claim is completely false. Gary Cohn took the phone off speaker and continued to speak with the president privately for several minutes before they concluded the call” spokesman Raj Shah told The Post.