FAIRFAX, Va. — Amid all the chaos of anti-US fervor sweeping the Arab world, the White House had to spend part of yesterday cleaning up a mess left by a confusing statement President Obama made about Egypt.

In an interview with Telemundo that aired Wednesday night, the president said of the Egyptian government, “I don’t think that we would consider them an ally, but we don’t consider them an enemy. They’re a new government that is trying to find its way.”

Problem is, Egypt has been designated a non-NATO ally for years — and yesterday, the White House clarified that there was no change in policy.

“ ‘Ally’ is a legal term of art,” said White House spokesman Jay Carney. “But as the president has said, Egypt is a long-standing and close partner of the United States.”

Meanwhile, Mitt Romney yesterday turned away from his searing criticisms of Obama’s handling of the crisis in the Middle East, instead focusing on the victims of the tragedy at the US consulate in Libya.

“I know that we have heavy hearts across America today,” Romney told a crowd of a few thousand at a park in northern Virginia, where he is waging a fierce political battle for votes with Obama.

“We’re in mourning,” Romney said. “We’re thinking about their families and who they left behind.”

It was a turnaround from Wednesday, when Romney slammed Obama for “sympathizing” with those who stormed the US Embassy in Cairo and accused the administration of “apologizing” to US enemies.

At one point yesterday, Romney was interrupted by a heckler who said the killings of Americans in Libya could have been prevented.

“I would offer a moment of silence, but one gentleman doesn’t want to be silent — so we’re going to keep on going,” Romney said.

Even as Romney pivoted back to other topics, his surrogates provided cover for his earlier criticism of the White House. Sen. John McCain (R-Ariz.) ripped Obama for his “feckless foreign policy.”

“What this is all about is American weakness and the president’s inability to lead,” McCain said on NBC’s “Today” show.

Romney did accuse Obama of moving to scrap a national strategy of having the resources to fight two full-scale wars at once.

“The world needs American leadership. The Middle East needs American leadership. And I intend to be a president that provides the leadership that America respects and will keep us admired throughout the world,” said Romney, who later jetted to two Long Island fund-raisers where donors paid up to $50,000 each.

Obama, in Colorado, engaged in saber rattling over the embassy attacks, saying:

“I want people around the world to hear me: To all those who would do us harm, no act of terror will go unpunished. It will not dim the light of the values that we proudly present to the rest of the world. No act of violence shakes the resolve of the United States of America.”