The 7.8 magnitude quake struck before dawn Monday led to the collapse of thousands of buildings, officials said.