Morsy orders military to maintain security until referendum complete