Sen. John McCain, R-Ariz., ripped President Barack Obama on Sunday over the administration’s response to Israeli Prime Minister Benjamin Netanyahu’s election victory.

“The president should get over it,” McCain said on CNN’s “State of the Union.” “Get over it — get over your temper tantrum, Mr. President. It’s time we work together with our Israeli friends and try to stem this tide of ISIS and Iranian movement throughout the region.”

Last week, Obama said that he is concerned about Netanyahu’s comments during the campaign opposing the creation of a Palestinian state.

“We continue to believe that a two-state solution is the only way for the long-term security of Israel,” Obama told the Huffington Post Friday. “Given his statements prior to the election, it is going to be hard to find a path where people are seriously believing that negotiations are possible.

“We take him at his word when he said that it wouldn’t happen during his prime ministership,” the president continued. “So that’s why we’ve got to evaluate what other options are available to make sure that we don’t see a chaotic situation in the region.”

“The least of your problems are what Bibi Netanyahu said in a political campaign,” McCain said Sunday. “I think the president maybe shouldn’t like it, but thousands are being slaughtered by ISIS. The Iranians have taken over the major capitols of Lebanon, Syria, Beirut and Baghdad. It pales in significance to the situation which continues to erode throughout the Middle East, and it puts America at risk. … The president has his priorities so screwed up that it’s unbelievable.”

McCain said Obama is letting his personal problems with Netanyahu get in the way of policy.

“Either that or he’s delusional. I’m not sure which,” he said.

The Arizona senator said if an Obama-backed resolution for Palestinian statehood is approved by the U.N. Security Council, Congress should reconsider its funding of the United Nations.

“It would be a violation because the president’s anger over a statement by Bibi, by the prime minister of Israel,” McCain said. “It would contradict the last at least 10 presidents of the United States.”