The deadly attack on Americans in Libya fueled a harsh escalation of the presidential campaign in the United States on Wednesday as Mitt Romney assailed President Obama’s handling of the situation, while Democrats accused Mr. Romney, the Republican nominee, of politicizing an international crisis.

A back-and-forth between the Romney and Obama campaigns over attacks in Libya and Egypt represented a rare partisan exchange over a foreign policy crisis and underscored the intensity and stakes of the campaign with less than two months until Election Day. The crisis has also rapidly emerged as a test of Mr. Romney’s handling of a fast-breaking international situation.