A U.S. military court in Iraq has acquitted an American officer on charges of aiding the enemy, but sentenced him to two years in prison on lesser charges.

The court Friday cleared Lieutenant Colonel William Steele of aiding the enemy by allowing prisoners, including an al-Qaida detainee, to use an unmonitored mobile phone. Steele had faced life in prison for that charge.

But the 52-year-old was convicted on charges that include acting inappropriately with a female interpreter and unauthorized possession of classified information. In addition to his prison sentence, Steele was dismissed from the army and will forfeit all pay and allowances.

Steele is the former head of the U.S. prison near Baghdad that had held ousted Iraqi leader Saddam Hussein. The judge allowed Steele credit for 254 days already served.

In other news, the U.S. military says coalition forces killed five terrorists and detained two suspects Friday during operations throughout the country targeting al-Qaida in Iraq. Separately, the military says five hostages were freed earlier in the week after U.S. soldiers, acting on a tip, discovered two houses in Baquba being used as "make-shift prisons."

In other developments, the military announced that one U.S. soldier was killed and another wounded in an attack Thursday in southern Baghdad. The military says the soldiers came under attack in a roadside bombing and by small arms fire.

It also says coalition forces detained six militants responsible for an October 17 attack on Iraqi and coalition troops in Babil, while forces arrested two militants found planting an improvised explosive device south of Baghdad.

Some information for this report was provided by AP and Reuters.