A Monday tweet from the Associated Press falsely implied the Pentagon was defying President Donald Trump by allowing transgender people to serve in the military.

The AP got nearly 17,000 retweets for a "BREAKING" news tweet claiming the Pentagon will allow transgender people to enlist in the military "despite Trump's opposition."

BREAKING: Pentagon says it will allow transgender people to enlist in the military beginning Jan. 1, despite Trump's opposition. — The Associated Press (@AP) December 11, 2017

The AP's framing led both Trump supporters and opponents to believe the Pentagon was willfully defying the president's order.

Will @potus finally admit he was wrong, and that the military doesn’t want, or need, his ban on trans troops? https://t.co/pSbYwrRWku — VoteVets (@votevets) December 11, 2017

This is what a coup looks like. Remove every General who approved this unlawful order, and court martial them. https://t.co/EWjgQ3ER0W — Mike Cernovich 🇺🇸 (@Cernovich) December 11, 2017

Dept. of Defense defies the President https://t.co/Da2H7f2Fl6 — West Wing Reports (@WestWingReport) December 11, 2017

But the AP's tweet failed to disclose that the Pentagon didn't decide to allow transgender individuals in the military. The announcement was instead a result of a court order blocking Trump's ban until it can be properly litigated.

U.S. District Judge Colleen Kollar-Kotelly issued an injunction in late October, arguing there was "no support for the claim that the ongoing service of transgender people would have any negative effect on the military at all." On Monday, she declined a request from the Trump administration to lift the injunction based on the administration’s argument it needs more time to prepare to process new transgender recruits for military service.

As a result of the injunction, Defense Department officials on Monday said transgender people will be allowed to enlist in the military beginning Jan. 1.

National security and legal reporters on Twitter called out the AP's misleading framing.

Just confirmed with the lead lawyer on this case: This tweet is WRONG. The Pentagon will *respect a court order* requiring transgender enlistment on Jan. 1. That's it. The order will likely be appealed before then. https://t.co/dL0F9fKCYE — Mark Joseph Stern (@mjs_DC) December 11, 2017

….because a federal judge just refused the Trump administration's emergency request to delay transgender enlistments. Important context missing below. Pentagon isn't defying Trump, it's following court orders. https://t.co/IQd30kKhRi — Vera Bergengruen (@VeraMBergen) December 11, 2017

A federal judge ordered the Pentagon to do so, and just rejected a motion to stay the order this afternoon—framing this as the military refusing the Commander in Chief’s directives is grossly irresponsible. https://t.co/mWy21q4eOL — James Hasson (@JamesHasson20) December 11, 2017

Other outlets accurately reported the reason for the Pentagon's move. "Transgender People Will Be Allowed to Enlist in Military as Court Case Advances," reported The New York Times, while Fox News reported "Pentagon says transgender people can enlist starting in January, after court order."