Military coup was well planned and very nearly succeeded, say Turkish officials