SEOUL, South Korea - South Korea brought home 195 army medics and engineers Friday from Afghanistan, ending its five-year deployment to help rebuild the war-ravaged country at Washington's request.

South Korea had planned to withdraw the troops, but reconfirmed that pledge to the Taliban to win the freedom of 21 kidnapped civilians in July after the insurgents killed two hostages.

The returning soldiers arrived at a military airport south of Seoul on a chartered civilian flight, said Maj. Lee Jin-wu, a South Korean army spokesman. The troops were the last batch of 2,131 soldiers who served on rotations in Afghanistan since 2002.

Separately, South Korea plans to extend its military presence in Iraq for another year after downsizing the number of troops 600 by the end of the month. The National Assembly, however, has not acted on the extension legislation out of concerns of possible voter backlash ahead of next week's presidential election.

Outgoing South Korean President Roh Moo-hyun has said the troop presence in Iraq will solidify the country's alliance with the United States.