Initial reports said the attacker fired from a mosque within in the city , 30 miles west of Baghdad .
The Centcom statement said the gunman appeared to have fired from a mosque in the city , 50 km ( 32 miles ) west of Baghdad .