WASHINGTON — The Obama administration is warning Americans against all but essential travel to Egypt and moving to reduce the official U.S. presence in the country amid fears of widespread unrest.

The State Department said Friday that Americans should defer nonessential travel to Egypt, citing the uncertain security situation. It also said it would allow nonessential staff and the families of personnel at the U.S. Embassy in Cairo to leave Egypt until conditions improve.

The move doesn’t require anyone to depart but encourages them to go by allowing them to do so at government expense. Officials say dependents and nonessential staff could be ordered to leave if the situation deteriorates.