Speaking to troops in Afghanistan on Friday, new US Defence Secretary Chuck Hagel warned, "Even as we move into more of a support role, this remains a dangerous and difficult mission." The Taliban proved him right on Saturday, when at least 18 people were killed in two separate suicide attacks.
At the time of the first suicide bombing outside the Afghan Defence Ministry in Kabul, Hagel was about a kilometre away in a US military facility. Nine people were killed.
The Taliban said it was a pre-planned attack that had not been timed for Hagel's visit, but held a message for him anyway - that they are "capable of attacking anytime, anywhere."
In another incident in the eastern city of Khost, eight children and one policeman were killed when a suicide bomber detonated his vest at a checkpoint.
A few hours before Hagel landed, three Afghan soldiers stormed the gate of a US military base in Kapisa province, killing one civilian contractor working for NATO. The gunmen were also killed.
The violence is a fresh reminder that the Taliban remain strong and continue to pose a serious security challenge, especially as US and NATO forces, currently numbered around 97,000, prepare to leave by the end of 2014.
This is the first official foreign visit for Hagel, a decorated Vietnam War veteran, since he was sworn in as the head of Defence Department in late February.
In a statement, Hagel said he was visiting "to better understand where we are in Afghanistan."
Javed Kohestani, an Afghan military expert, said that Hagel not only wanted to examine the ability of Afghan forces that will take over after US and allied troops leave, but also improve the uneasy relationship between Washington and Kabul.
"I think Hagel wants to repair some tensions that has emerged between President (Hamid) Karzai and the US by reassuring on Washington's long-term commitments to the Afghan defence ministry," Kohestani said.
In February, Karzai banned Afghan forces from asking for air support from NATO and US troops after one such strike killed eight civilians, and also kicked out US Special Forces from a volatile province over allegations of abuse.
Hagel was scheduled to meet with Karzai during his visit. But due to security concerns, the officials did not disclose a time.
Former army general Abdul Waheed Taqat was not optimistic that the deteriorating ties between the two countries would be mended by Hagel's one visit.
"The US does not obey President Karzai in regards to military operations," he said.
Yet he does not believe Karzai's air support ban is in the best interest of the country's fledgling military, saying that Afghan forces will "suffer big losses," especially when they are caught in heavy ground battles with militants.
The mistrust between the two allies was on full display Saturday, when a ceremony to hand full control of the Bagram detention facility from the US to the Afghan Defence Ministry was cancelled.
While Afghan officials explained it was due to Hagel's visit, American fears over the release of prisoners in custody was the more likely cause.
The Afghan government has tried to exert full control on Afghan prisoners, calling it a matter of sovereignty. The United States, however, worries that dangerous militants could be released back on to the battlefields.
Last week, Karzai promised to free all "innocent" Afghans held by the US at prisons in Afghanistan.