JACKSONVILLE, FLA. — Republican challenger Mitt Romney sought to portray President Barack Obama as weak on foreign policy Wednesday after violent attacks on U.S. diplomatic missions in the Middle East. Obama steered clear of the political fight, declaring as commander in chief that “justice will be done” in response to the deaths of four Americans in Libya.

Romney used the attacks as an opening to assail Obama during an appearance in Florida, accusing the administration of sending “mixed signals to the world” and failing to lead in the face of violence.

Obama avoided engaging Romney during an appearance in the White House Rose Garden with Secretary of State Hillary Clinton. Addressing the nation and the world, he said there was “absolutely no justification for this kind of senseless violence — none.”

He was responding to the Tuesday night attack that killed U.S. ambassador to Libya Chris Stevens and three American members of his staff.

Romney had jumped to criticize Obama as the attacks were being waged on U.S. diplomatic missions in Egypt and Libya. Angry mobs attacked the facilities to protest an obscure film by a California filmmaker that ridiculed Islam’s Prophet Muhammad.

The U.S. Embassy in Cairo initially issued a statement that criticized the film. Romney, trailing Obama in public opinion polls on their leadership on foreign policy, quickly pounced with a statement before news of the diplomats’ deaths, saying the administration’s response seemed to “sympathize with those who waged the attacks.”

Meanwhile, U.S. Senator Jim DeMint, R-S.C., responded to the attacks, saying, “The death of Ambassador Chris Stevens, American Foreign Service Officer Sean Smith and two other Americans is an outrage.

“Governor Romney is absolutely right, there is no justification for these deadly attacks and we should never apologize for American freedom. Islamic radicals will use any pretext to justify their hatred of America and our freedom.”

As news of the deaths came from the White House on Wednesday morning, the Romney team scrambled to change a speech before supporters to a more somber event.

The supporters were ushered from the room and four flags were set up behind the podium from which Romney read a brief statement mentioning Egypt and contending that Obama is a weak leader. He then invited questions from reporters, who asked if it was an appropriate tone to take given the deaths and that the White House said it disagreed with the embassy statement. Romney stood firm.

“The president takes responsibility not just for the words that come from his mouth, but also for the words that come from his ambassadors, from his administration, from his embassies, from his State Department,” Romney said. “They clearly sent mixed messages to the world. The statement that came from the administration — and the embassy is the administration — the statement that came from the administration was a statement which is akin to apology. And I think was a severe miscalculation.”

Obama did not mention Romney and instead focused on the diplomats who were lost.