Even some Republicans questioned Romney’s handling of the issue, calling it hasty. Top GOP leaders in Congress pointedly declined to endorse his criticism of the president.

Said Obama: ‘‘It’s important for you to make sure that the statements that you make are backed up by the facts. And that you’ve thought through the ramifications before you make ‘em.’’

Obama-the-political-candidate’s unusually personal criticism, which came in an interview with CBS News, stood in contrast to his appearance outside the White House earlier in the day. Then, he somberly mourned the deaths and announced the deployment of additional Marines at diplomatic posts overseas in his capacity as commander in chief.

‘‘And make no mistake. Justice will be done’’ he declared, referring to those responsible for the murders of Chris Stevens, U.S. ambassador to Libya, and three others.

The four diplomats, including 52-year-old Bay Area native and Ambassador Chris Stevens, were killed on Tuesday night as protesters overran and burned the U.S. Consulate in Benghazi, Libya. In a separate incident, the American Embassy in Cairo, Egypt, was breached by protesters, and the nation’s flag was ripped down, although no deaths were reported there.

Either way, some Republicans joined Democrats in questioning Romney’s decision to inject himself into the situation thousands of miles away with his critical statement Tuesday night.

He followed up with morning remarks in which he blasted the administration’s initial statement from Cairo as disgraceful and ‘‘akin to apology.’’

He added, ‘‘It’s never too early for the United States government to condemn attacks on Americans and to defend our values.’’

Appearing in Jacksonville, Fla., Romney quickly broadened his remarks to emphasize other disagreements he has with Obama on national security issues, citing ‘‘differences of opinion with regards to Israel and our policies there; with regards to Iran, with regards to Afghanistan, with regards to Syria.’’

The events unfolded with less than eight weeks remaining in the race for the White House, a campaign that has been close for months and appears likely to be settled in fewer than 10 battleground states.

The state of the economy has been the top issue by far from the beginning of the race, and recent surveys suggest Romney holds a narrowing advantage over the president when it comes to plans for reducing the nation’s unemployment rate of 8.1 percent.

The situation has long been different on foreign policy. Asked in a Washington Post-ABC News poll last week which candidate was better suited to handle international affairs, registered voters picked Obama by a margin of 51 percent to 38 percent.

The Republican challenger has worked to whittle away at that deficit, and he made a heavily publicized overseas trip early this summer as part of his effort. He drew mixed reviews at best— reproached by British officials, for example, when he appeared to question preparations for the Olympic Games in London.

Nor has Obama ceded any territory. Speeches and video presentations at last week’s Democratic National Convention were heavily stocked with references to the daring raid the president ordered more than a year ago that resulted in the death of terrorist mastermind Osama bin Laden.

Romney, on Wednesday, defended his decision to issue his criticism Tuesday night, at a time it was not yet known that Stevens had been killed. Asked if he would have done so had he been aware of the deaths, he said, ‘‘I’m not going to take hypotheticals about what would have been known and so forth.’’

Gordon Johndroe, a national security aide during George W., Bush’s presidency, said Romney’s reaction as a candidate was quicker than he would be able to make if he were president.

‘‘Events happen quickly but the information at first is very vague and uncertain. You don’t know who has done the attack, how many people, who was attacked, were people just injured or killed. It takes a while for information to come through, and you have to be very careful and cautious when responding.’’

While Obama initially chose not to respond to Romney, he shed his reluctance later in the day and compared Romney’s reaction unfavorably to the way many other Republicans responded.

‘‘And so I think if you look at how most Republicans have reacted, most elected officials, they reacted responsibly,’’ Obama said. ‘‘Waiting to find out the facts before they talked, making sure that our No. 1 priority is the safety, the security of American personnel. It appears that Gov. Romney didn’t have his facts right.’’

Top Republican leaders in Congress did not come to Romney’s defense as they — like the GOP challenger and the president — mourned the deaths of the fallen diplomats.

U.S. Senate Republican leader Mitch McConnell of Kentucky said Obama ‘‘correctly tightened the security overseas.’’ Asked about Romney’s remarks, he declined to answer and walked toward his office in the Capitol.

U.S. House Speaker John Boehner issued a brief statement condemning the violence against the U.S., as did Majority Leader Eric Cantor of Virginia, but neither included any reference to the president.

Romney’s account didn’t mesh completely with events in Cairo.

The embassy statement that he referred to as akin to apology was issued by the embassy in Cairo at midday on Tuesday at a time the staff was aware of still-peaceful demonstrations in the area nearby. It was four or five hours later when the mob breached the compound’s walls and tried to burn a U.S. flag.

The embassy statement condemned ‘‘the continuing efforts by misguided individuals to hurt the religious feelings of Muslims — as we condemn efforts to offend believers of all religions,’’ and noted that religious freedom is a cornerstone of American democracy.