Upcoming elections in March that will determine who will lead Iraq as American forces go home are of "enormous importance" to the country's future, the leading US general who oversees the wars in Iraq and Afghanistan said on Friday. Gen. David Petraeus, who used to be the top American commander in Iraq, also warned during a visit to Baghdad that al-Qaida in Iraq as well as Iranian-backed militias will continue to be a threat as insurgents target government facilities in order to undermine Iraqis' confidence. "Iraq will continue to be tested throughout the course of this year," Petraeus said. Iraq is preparing to hold nationwide elections on March 7, but military commanders have warned that attacks could spike ahead of the vote. Under a plan by President Barack Obama, US forces currently at about 110,000 will drop to about 50,000 by the end of August, and those remaining will be focused on non-combat missions such as training. They in turn, will leave by 2011. The general's comments came as US forces in Iraq held a ceremony marking a change from what had formerly been called Multi-National Force-Iraq to United States Force-Iraq. Structurally the US forces in Iraq will remain largely the same for the time being, but the name change symbolizes the changing nature of the US mission here and acknowledges that a coalition that used to have troops from 32 countries now has just one. Petraeus called the ceremony a "milestone in the continued drawdown of US forces in Iraq." Speaking of freed British hostage Peter Moore, Petraeus said that Moore spent at least part of his captivity in Iran, but that it was difficult to tell whether the Revolutionary Guard or the Quds force - an arm of the Guard involved in foreign operations - had a role in his capture. Moore was freed Wednesday after spending more than two years in captivity. He, and four of his bodyguards, were kidnapped during a brazen, daytime attack in front of the Finance Ministry in Baghdad in 2007. The bodyguards are believed to be dead. Commenting on the release of Qais al-Khazali, an Iraqi militant heading a group believed to have been holding Moore and the others, Petraeus said his release from US to Iraqi custody was done according to an agreement with the Iraqi government to transfer detainees in American custody over or release them. Al-Khazali, the leader of Asaib Ahl al-Haq, was in US custody, accused of helping play a role in an attack in the southern city of Karbala that left 5 US soldiers dead in 2007. The militant group had been pushing for al-Khazali's release along with the release of other militants in US custody. US and British authorities have said there was no deal to trade al-Khazali for Moore although the timing of al-Khazali's release - said by the British government to have happened the same day Moore was released - has raised questions. A representative of al-Khazali's group and an Iraqi member of the negotiating team that helped secure Moore's release told The Associated Press that the terror group did not release Moore until it got confirmation its leader was transferred. Under a process spelled out in a US-Iraq security deal, the Americans have been transferring detainees in their custody to the Iraqi government and releasing others.