WASHINGTON (AFP) - American troops suffered the most losses in 2008 since the start of the Afghanistan war due to a resurgent Taliban and al-Qaeda, while witnessing the lowest US death toll in six years in Iraq, which saw a relatively improved security. According to a tally by the independent website icasualties.org, 314 US troops died in Iraq in 2008, down by nearly two thirds from the 904 US military deaths the previous year, the deadliest since the US-led invasion in 2003. Some 4,221 American soldiers have died in the war that has cost the US hundreds of billions of dollars. But in Afghanistan, trends reversed, with 155 US troops killed there in 2008, up from 117 US soldier deaths in 2007. The war launched by the US in 2001 to root out the Taliban has made 630 US troop deaths. With Washington poised to nearly double its presence in the impoverished country by sending up to 30,000 troop reinforcements, US soldier deaths could continue to trend upward there, top US military officials tacitly acknowledged. Some 70,000 foreign troops are already deployed in Afghanistan under US or NATO auspices. Non-US troop deaths were at 138 in 2008, up from 115 the previous year. A few more of the nearly 40 nations with troops in the country are also expected to increase their deployments. The pledges of fresh deployments come after a difficult year, which has seen the deadliest bomb attacks to hit Afghanistan since the start of the war. The number of improvised explosive devices (IEDs) doubled in 2008 to roughly 2,000, the US embassy in Kabul indicated. The roadside bombs are the number one killer of US troops in Afghanistan, the US military has said. Troop increases in Afghanistan are made possible by troops standing down in Iraq, which has seen an improved security situation. Iraqi deaths also plunged, with some 6,772 Iraqis killed in 2008, down from 17,430 in 2007, according to a tally compiled by AFP. Best estimates for total Iraqi deaths since the war began hover around a low of 90,000. Iraq's drop in violence comes after the US troop "surge" in 2007 that saw thousands of troops deployed as the country teetered on the edge of civil war. Much of Iraq's security developments have been credited to the recruitment of Sunni tribesmen and former rebels by the US military to fight against al-Qaeda. The Mahdi Army, the powerful Shia party of Moqtada al-Sadr, also agreed to a ceasefire, helping to reduce violence by the extremists. Iraq began 2009 with an end to the UN mandate on foreign troop presence, gaining formal control of Baghdad's heavily fortified Green Zone " where most US and Iraqi officials live and work " and of the southern Basra airport. US troops will continue to play an advisory role to the Iraqi military. The United States is to pull its forces out of Iraqi cities by June 2009 and end its military presence by the end of 2011 under a deal between Baghdad and Washington that grants Iraqi authorities more control over security operations. The US military has also handed back to the Iraqis control of part of its airspace and Baghdad airport. The US must now obtain Iraqi permission for all military operations and hand over the files of all detainees in US custody to the Iraqi justice system. But as part of political bargaining leading up to the vote, the Baghdad government agreed to demands by Sunni parties to hold a referendum on the accord no later than July 30. Should the Iraqi government decide to cancel the accord after the referendum it would have to give Washington one year's notice to leave the country. The move injects a fresh element of uncertainty on the future of US troops in Iraq just as president-elect Barack Obama prepares to take office in less than three weeks on January 20.