US Secretary of State John Kerry Monday met with the family of a young diplomat killed in Afghanistan, making an extra stop at the end of a 10-day trip to pay his condolences.

Kerry, who had met Anne Smedinghoff during a trip to Afghanistan last month, diverted his plane to make a special visit to Chicago as he flew back from Asia.

The "private" meeting with Smedinghoff's parents, her siblings and the fiance of one of her sisters lasted about an hour, officials said.

Reporters were not allowed to attend but saw Kerry carrying a large bouquet of yellow flowers as he went into the building.

Kerry had announced earlier Monday during a meeting with embassy staff in Tokyo that he was making the surprise and rare change to his carefully-crafted schedule.

Smedinghoff, 25, was one of five Americans killed in separate attacks on April 6 in Afghanistan, one of the deadliest days of the year so far for foreigners in the war-torn country.

Her death shook the US, with relatives and colleagues paying tribute to a smart, young woman at the beginning of a promising career.

It had also marred the start of Kerry's overseas trip, as he learned of the attack on the day he left for his first stop in Istanbul.

"Everybody understands and feels that kind of a loss. A 25-year-old young woman full of ideals, full of hopes, taking books to children in a school so they can learn... wiped out by terrorists," Kerry told embassy staff in Tokyo.

"We are not going to be deterred. We are going to be inspired. And we'll use Anne's idealism as another motivation to the idealism that brings all of you to this effort in the first place," he said.

"We can make this world better," Kerry said. "We can strengthen other countries. We've seen it happen.

"As long as I am secretary of state I promise you I will do everything in my power to cover your back, you cover mine. We'll be a good team and together we'll get the job done."

Smedinghoff's parents said in a statement earlier that their daughter had "enjoyed the opportunity to work directly with the Afghan people".

She "was always looking for opportunities to reach out and help make a difference in the lives of those living in a country ravaged by war," they added.

The last American diplomat killed on the job was US ambassador to Libya Chris Stevens, who died with three other in a militant attack on a US mission in Benghazi.

At least three US soldiers and another civilian were killed in the attack in Afghanistan that saw a suicide car bomber strike a NATO convoy in the southern province of Zabul.

Speaking to staff and families from the US Consulate General in Istanbul the following day, Kerry acknowledged that such attacks pose a "huge challenge" as US troops and their NATO allies prepare for a withdrawal at the end of next year.

"It's a grim reminder to all of us, though we didn't need any reminders, of how important and also how risky carrying the future is... and just trying to provide opportunity to those young boys and girls and men and women in Afghanistan."

Smedinghoff's first assignment as a diplomat was in Caracas before she volunteered to work in Afghanistan starting in July as a public diplomacy officer.

Her parents said she had joined the US Foreign Service right after graduating from college in 2009 and loved her work, despite the risk.

"We always knew in the back of our minds that this was a possibility. She went everywhere. She usually told us about it afterward, but she never expressed any fear at all," her father told CBS News.

In their statement, Smedinghoff's parents said they were "consoled knowing that she was doing what she loved, and that she was serving her country by helping to make a positive difference in the world."