According to the Associated Press, a US appeals court ruled Tuesday that a judge must narrow an order for LinkedIn to hand over journalists' messages in a leak probe. The court said the government is not entitled to a "blanket" order. But it kept the order alive.

A three-judge panel of the 4th US Circuit Court of Appeals heard the case, the AP reports. The Trump administration wants a broad set of LinkedIn records from the journalists. Their employer is not named in court papers, the AP says.

"A request by the government to scoop up reporters' records wholesale and ascertain the identity of their sources would tip the balance against informed discourse in a manner inimical to democratic health," Judge J. Harvie Wilkinson III wrote in the unanimous opinion, according to the AP.

The panel also turned down LinkedIn's bid to toss out the "substantially overbroad" order, the AP reports. "Serious security and speech claims are in tension in this case," Wilkinson wrote. He was picked by Republican President Ronald Reagan. The other two judges were picked by Democratic Presidents Barack Obama and Joe Biden, the AP says.

The probe began after a news outlet that is not named wrote about a top-secret US military mission in a foreign country, the AP reports. The journalists wrote nearly 1,000 stories in the 18 months the order covers. The order would unmask every secret source they reached on LinkedIn in that time, the AP says.

"While that order may catch sources relevant to the government's investigation, it will also inevitably sweep in every other confidential source with whom the targeted journalists spoke," Wilkinson wrote. The panel sent the case back to US District Judge Elizabeth Hanes in Newport News, Virginia. She must now narrow the order, the AP reports.

Only the Associated Press has reported this so far; NewsHabit hasn't seen independent confirmation.

What we know: An appeals court ruled that a judge must narrow an order for LinkedIn to share journalists' messages in a leak probe, the Associated Press reports. What we don't know: How narrow the new order will be, and whether another outlet will independently report the ruling.