WASHINGTON — In a classic case of shutting the barn door after the horse has left, the Obama administration and the Department of Defense have ordered the hundreds of thousands of federal employees and contractors not to view the secret cables and other classified documents published by Wikileaks and news organizations around the world unless the workers have the required security clearance or authorization.

“Classified information, whether or not already posted on public websites or disclosed to the media, remains classified, and must be treated as such by federal employees and contractors, until it is declassified by an appropriate U.S. Government authority,” said the notice sent on Friday afternoon by the Office of Management and Budget, which is part of the White House, to agency and department heads, urging them to distribute it to their staff.

The directive applies to both government computers and private devices that employees or contractors might have, as long as they are accessing the documents on nonclassified government networks. It does not advise agencies to block WikiLeaks or other websites on government computer systems, a White House official said Saturday. And it does not prohibit federal employees from reading news stories about the topic. But if they have accidentally already downloaded any of these documents, they are being told to notify their “information security offices.”

The Department of Defense, in its own directive to military personnel and contractors, says that simply viewing these documents, without proper authorization, will violate long-standing rules even though they are accessible to the public at large on Internet sites.