(Bloomberg) -- If President Joe Biden was trying to agitate Republicans over cutting Social Security and Medicare, it worked.

The president and House Republicans got into a shouting match in the middle of the State of the Union address after he said some of them favored cuts to Medicare and Social Security. 

House Speaker Kevin McCarthy shook his head silently, while firebrand conservative Representative Marjorie Taylor Greene of Georgia, stood and shouted “liar” over Biden.

That was when Biden went off-script and engaged with Republicans. “We never said that,” said another Republican, Byron Donalds of Florida.

“As we all apparently agree, Social Security and Medicare is off the books now,” Biden said to applause from sides of the aisle. “We got unanimity!”

Some GOP plans, including the House Republican “Commitment to America,” have called for strengthening Medicare and Social Security, but preclude tax increases, meaning they would likely have to rely on cuts to ensure the solvency of the program.

Biden’s speech was punctuated at other points by Republican outbursts, calling on him to “secure the border.” After Biden mentioned the sharp rise in US fentanyl deaths, Republican Andy Ogles of Tennessee shouted, “It’s your fault!” 

Republicans also laughed at Biden when he conceded that “we are going to need oil for at least another decade” as the country transitions to clean-energy sources.

Greene, who walked around the Capitol with a white balloon on Tuesday, also yelled at another point that China is spying on the US. The US this week shot down an alleged spy balloon from China. 

--With assistance from Erik Wasson and Josh Wingrove.

(Updates with Ogles, in seventh paragraph.)

©2023 Bloomberg L.P.