Credit: The Associated Press

In this Monday, June 9, 2014 image taken from video obtained from the Iraqi Military, which has been authenticated based on its contents and other AP reporting, armed Iraqi soldiers take their positions during clashes with militants in the northern city of Mosul, Iraq. (AP Photo/Iraqi Military via AP video)

BAGHDAD — In a stunning assault that exposed Iraq's eroding central authority, al-Qaida-inspired militants overran much of Mosul on Tuesday, seizing government buildings, pushing out security forces and capturing military vehicles as thousands of residents fled the second-largest city.