The Centcom statement said the gunmen appeared to have fired from a mosque in the city , 50 km ( 32 miles ) west of Baghdad .