Majority Leader Kevin McCarthy noted he’s had “many spirited debates” on the House floor with Minority Whip Steny Hoyer – and Thursday was no exception.

In the midst of a heated argument about the looming threat of a government shutdown and funding for border security, McCarthy issued a blunt warning for the next majority leader.

“I’d watch your words, friend, because I’m going to look forward to seeing how well you do with the new faction coming in on your side,” the California Republican said. “It will be quite interesting to watch.”

The fight centered on President Trump’s insistence of funding for a border wall – one of his most prominent campaign promises. Earlier this week, Trump said he would be “proud” to shut down the government “for border security.”

"Shutting down the government is stupid, shutting down the government is costly, shutting down the government creates great uncertainty." — Rep. Steny Hoyer, D-Md.

Responding to that threat during their colloquy, Hoyer fumed: “What kind of irresponsibility is that?”

CHRISTMAS SHUTDOWN? TRUMP CLASH WITH DEMS RAISES NEW CONCERNS ON BUDGET DEADLOCK

“Shutting down the government is stupid, shutting down the government is costly, shutting down the government creates great uncertainty – not only among those who work for the federal government but everybody who relies on the daily activities of the federal government,” Hoyer said.

McCarthy also said that a shutdown would be "stupid." But he took a swipe at Hoyer, saying he “learned that lesson” earlier this year.

In January, the government shuttered for three days after Democrats and Republicans clashed over immigration spending. Then, Democrats vowed to reject any budget deal that did not include a legislative fix for DACA, an Obama-era program that offers protections for immigrants who came into the U.S. illegally as children.

“I think that you learned that lesson because I didn’t think it was helpful when you shut the government down over immigration last time,” McCarthy said.

MCCONNELL HOPES FOR ‘CHRISTMAS MIRACLE’ TO SAVE GOVERNMENT FROM ANOTHER SHUTDOWN

Despite the heated exchange, McCarthy and Hoyer appeared to end their back-and-forth on a positive note when the former pulled out a bag of candy from his hometown and presented it to the Maryland Democrat as a gift.

“I must say, Mr. Speaker, I am of serious suspicions – I trust the majority leader – but I believe that gift was probably purchased by Judy, his wonderful, beautiful life,” Hoyer said to laughter.

Fox News' Chad Pergram contributed to this report.