Mitt Romney said Monday that he would have ordered the raid that led to the killing of Osama bin Laden, remarks that came in response to Democratic suggestions that Mr. Romney might not have ordered the strike last year had he been president.

“Even Jimmy Carter would have given that order,” Mr. Romney told reporters at a campaign stop here on Monday, referring to the former Democratic president who has since become an anti-war advocate. (In 1980, Mr. Carter ordered a failed rescue mission for the American embassy hostages in Iran.) Mr. Romney made those remarks in response to a question shouted at him as he shook hands with supporters.

In his remarks, the presumptive Republican nominee accused the president of focusing on “silliness” to distract from an economy still struggling to fully recover.