President Obama and even some Republicans criticize Mitt Romney for assailing the initial administration response on the day of the attacks on U.S. diplomatic missions in Libya and Egypt.

WASHINGTON — The deeply partisan nature of this year's campaign intruded abruptly into a foreign policy crisis as Republican nominee Mitt Romney sharply criticized the Obama administration for issuing an "apology for America's values" and the president retorted that his challenger was politicizing a tragedy.

Romney's speed in assailing — his campaign issued its first statement Tuesday night — appeared to some to violate traditions of at least momentary unity in the face of a foreign threat. In this case, it was the attacks on the U.S. Embassy in Cairo and the consulate in Benghazi, Libya, the latter of which took the lives of the American ambassador and three other Americans.

Some Republicans said he had opened himself to criticism.

"I probably would have waited 12 or 24 hours and put out a more comprehensive statement," Rep. Peter T. King (R-N.Y.), chairman of the House Homeland Security Committee, told reporters on Capitol Hill. Romney's statement "can be perceived as being political."

Other Republican officials said Romney had hurt himself by failing to appear steady and presidential in his comments. Even in a campaign dominated by economic issues, many voters view handling of foreign crises as a threshold qualification for the presidency. Polls consistently have shown that Romney lags behind President Obama on that question.

Romney advisors rejected the criticism, saying that the attacks were an important foreign policy issue for the campaign and that their statements illustrated a major point of contrast with Obama. During the campaign and in his campaign book, "No Apology," Romney repeatedly has charged that Obama apologizes for America.

"This is yet another opportunity for us to identify the clear contrast between Gov. Romney and President Obama with respect to how they would lead our country," said Lanhee Chen, Romney's campaign policy director.

Romney's accusation centered on a statement that U.S. diplomats in Cairo had issued shortly after noon local time Tuesday — about 6 a.m. in Washington — as crowds began to gather near the embassy. The statement, commenting on anti-Islamic video posted on YouTube, said the embassy opposed "continuing efforts by misguided individuals to hurt the religious feelings of Muslims — as we condemn efforts to offend believers of all religions."

In a brief news conference in Jacksonville, Fla., Romney said that it was "a terrible course to — for America to stand in apology for our values."

"When our grounds are being attacked and being breached, that the first response of the United States must be outrage at the breach of the sovereignty of our nation. And apology for America's values is never the right course."

When reporters noted that the statement had been issued before protesters climbed the embassy walls in Cairo, Romney said, "It's never too early for the United States government to condemn attacks on Americans and to defend our values."

The embassy's words, reiterated in a Twitter message, were "a disgraceful statement on the part of our administration to apologize for American values," he said.

His words drew a sharp rebuke from Obama. "I think most Americans, Democrats or Republicans, understand that there are times when we set politics aside, and one of those is when we've got a direct threat to American personnel who are overseas," he said in an interview with CBS that had been scheduled before the violence began.

"Gov. Romney seems to have a tendency to shoot first and aim later," Obama said. "As president, one of the things I've learned is you can't do that; it's important for you to make sure that the statements that you make are backed up by the facts."

Earlier, Obama said, "We will not waver in our commitment to see that justice is done for this terrible act. And make no mistake, justice will be done."

Some Republicans stood by Romney.

"Again and again under President Obama we have met threats and thugs with apologies and concessions," said Rep. Howard P. "Buck" McKeon (R-Santa Clarita), the chairman of the House Armed Services Committee. "Unsurprisingly, these mobs aren't satisfied with apologies anymore. Is it any wonder that events spun out of control and that American lives were lost?"

The allegation that Obama is an apologist has been a sure-fire applause line during Romney campaign rallies. It connects with a strongly held view of many Republicans. Those voters, however, presumably already side with Romney. Other Republicans worried that his words would turn off less committed voters.

"Not much is required of Gov. Romney on this. He has to be poised. He has to be sure-footed. He has to be precise. He was none of those," said Ed Rogers, a longtime Republican strategist.

Obama spoke in the White House Rose Garden, while Romney made his remarks at a former wallpaper shop in a strip mall that was being used as a campaign "victory center." He was in Jacksonville for a fundraiser, but his campaign added a hastily arranged rally at the office, then ushered several dozen supporters outside and quickly set up a podium after deciding that a rally would be the wrong backdrop for comments on an ambassador's death.