The military said it seized control "to reinstall the constitutional order, democracy, human rights and freedoms, to ensure that the rule of law once again reigns in the country, for the law and order to be reinstated."
The military statement went on to say that "all international agreements and commitments will remain. We pledge that good relations with all world countries will continue."
I think this was a reaction to the move to "Islamicise" the country by President Recep Tayyip Erdogan. I read an article about how the country was moving in that direction a while back. Hopefully, there won't be any bloodshed going forward.