US secretary of state John Kerry has made a brief stop in Afghanistan to promote co-operation from a would-be unity government that has proved largely incapable of running the country less than two years after he worked to install it.
For America's leading diplomat, it was the second visit in as many days to a country the US long has wished to stabilise.
On Friday in Baghdad, he backed efforts by Iraq's prime minister to settle a political crisis and stressed the importance of having a "unified and functioning government" to confront Islamic State.
In Kabul, Mr Kerry scheduled a joint meeting with Afghan president Ashraf Ghani and his rival, chief executive Abdullah Abdullah, and later planned to see each leader separately. Mr Kerry is expected to participate in talks on security, governance and economic development.
Afghanistan remains largely lawless, is rife with corruption and struggling to check the Taliban's stubborn insurgency.
"We need to make certain that the government of national unity is doing everything possible to be unified and to deliver to the people of Afghanistan," he told foreign minister Salahuddin Rabbani and other officials. Mr Kerry said he would tell Mr Ghani and Mr Abdullah to drop their "factional divisions".
The challenges in Afghanistan are not unlike those he encountered on Friday in Iraq.
The US invaded both countries under President George W Bush and hoped to foster stable democracies. It has not happened, even though the US has spent billions and several thousand Americans have died in military operations.
Governments in both countries lack control over significant areas. Afghanistan's war against the Taliban is entering its 15th year, and Iraq is still trying to muster the strength for an assault on Mosul, its second largest city, and other places held by IS.
Sectarian and personal rivalries threaten both governments, and security vacuums in each threaten the US.
Despite President Barack Obama's pledges to end both wars, American troops cannot just leave. There are 9,800 US forces in Afghanistan, set to drop in principle to 5,500 next year. In Iraq, there are 3,780.
Mr Obama has less than 10 months to leave both places in better shape, but the strategies differ: In Iraq, the US seeks the destruction of IS; in Afghanistan, it hopes to draw the Taliban into peace talks.
First, however, the Kabul government might need to reconcile its own divisions.
Following a bitterly fought and inconclusive presidential election in 2014, Mr Ghani and Mr Abdullah are sharing power under a deal Mr Kerry brokered. But the partnership has never really been defined and the government is in disarray. There are predictions it could collapse due to corruption and incompetence.
After almost two years, Mr Ghani and Mr Abdullah have failed to set aside their rivalries.
The bitterness stems from a belief in Mr Abdullah's camp that the election was stolen and gifted to Mr Ghani - an anthropologist who lived in the US for three decades - as someone with whom Washington could more easily do business.
The leaders also are seen as pandering to different constituencies: in Mr Ghani's case, the majority ethnic Pashtuns, and in Mr Abdullah's, the Tajiks.
The pair recently cleared their diaries for a full-day meeting to iron out differences, but gave up after only two hours, Afghan and foreign officials said.