Mitt Romney said he was "pleased" by US President Barack Obama's visit to Afghanistan, after the election-year rivals had sparred over the commemoration of the killing of Osama bin Laden.
"I am pleased that President Obama has returned to Afghanistan. Our troops and the American people deserve to hear from our president about what is at stake in this war," the Republican candidate said in a statement.
"Success in Afghanistan is vital to our nation's security."
Romney has been critical of Obama's foreign policy and his announced plans to draw down in Afghanistan, arguing that it encourages the Taliban insurgency there to dig in and await the departure of US troops.
But late Tuesday, in keeping with the longstanding tradition of not criticizing the president when he is abroad on official business, Romney confined his comments to praising US troops.
"Let us honor the memory of the fallen, not only by keeping them in our daily thoughts but also by staying true to their commitment. We are united as one nation in our gratitude to our country's heroes," he said.
Earlier on Tuesday, Romney had said it was "inappropriate" for Obama to "politicize" the anniversary of the killing of Bin Laden by releasing a campaign ad questioning whether Romney would have given the same order.
Romney made the earlier comments before Obama's surprise arrival in Afghanistan, as the former Massachusetts governor visited a fire station in Manhattan that lost 11 first responders in the September 11, 2001 attacks.
The campaign ad presented the daring special forces raid into Pakistan that killed Bin Laden this time last year as proof of Obama's strength on national security and ability to make tough decisions.
Romney has all but won the Republican nomination to take on Obama in the November 6 election, which is expected to turn on the president's handling of the economy in the wake of the 2008 financial crisis.