Updated

WASHINGTON -- Defense Secretary Robert Gates ordered military officials Friday to clear interviews and other contacts with the news media with the Pentagon after President Barack Obama fired the top general in Afghanistan for embarrassing comments in a magazine interview.

Gates' order, which is effective immediately, tells officials to make sure they are not going out of bounds or unintentionally releasing information that the Pentagon wants to hold back.

The order was issued in a brief memo sent to military and civilian personnel worldwide. It does not spell out exactly how the new directive will work but appears to require hundreds or thousands of officers to funnel interview requests through a small central office at the Pentagon.

"I am concerned that the department has grown lax in how we engage with the media," Gates wrote.

"We have far too many people talking to the media outside of channels, sometimes providing information which is simply incorrect, out of proper context, unauthorized, or uninformed by the perspective of those who are most knowledgeable," about how the information may fit into larger government operations or goals.

The order, first reported by The New York Times on its website Friday night, has been in the works since long before Gen. Stanley McChrystal stunned his bosses with criticism and complaints in a Rolling Stone magazine article that his superiors did not know was coming.

"We were not happy with the content, and we were not happy that we didn't know about it," Assistant Defense Secretary Douglas Wilson said this week.

Nonetheless, Wilson promised that no "Iron Curtain" would fall between the Pentagon and the news media.

McChrystal this week told the Army he will retire. In the Rolling Stone article, the four-star general and some of his aides were quoted criticizing Obama's war effort; McChrystal complained that he was backed into "an unsellable position" during last fall's long White House deliberations on whether to add more troops.

Leaks during that process infuriated Gates.

Gates' memo requires top Defense Department officials to tell Wilson's office before interviews "or any other means of media and public engagement with possible national or international implications."

Gates warned in the memo that the leaking of classified information "is against the law, cannot be tolerated and will, when proven, lead to the prosecution of those found to be engaged in such activity."

Pentagon press secretary Geoff Morrell said that Gates remains committed to open dealings with the media and that he has tried to impress on colleagues that "the press is not the enemy."

Indeed, Gates answers questions frequently and can be more revealing and plainspoken than many Cabinet officials or his own subordinates at the Pentagon.

"It's not designed in any way to limit our interaction or restrict it, or dampen it," Morrell said of Gates' order. "It is designed to get our department much more disciplined."