TV host Rachel Maddow tends bar at the MSNBC after-party at the Italian Embassy, following the annual White House Correspondents' Association dinner in Washington DC in April 2013 Reuters/Jonathan Ernst

Just before MSNBC's Rachel Maddow went on air last night (14 March) the White House issued a statement condemning what she was about to do as "illegal". Maddow was about to reveal two pages of President Donald Trump's 2005 tax return live on television.

The leaked portion of Trump's document obtained by Pulitzer Prize-winning investigative journalist David Cay Johnston showed Trump paid $38m (£31m) in taxes on an income of more than $150m in 2005.

"Despite this substantial income figure and tax paid, it is totally illegal to steal and publish tax returns," the White House said, raising the question of whether MSNBC could face legal action.

In early October 2016, then Republican presidential candidate Trump threatened to sue the New York Times for running a story revealing that he claimed a $916m loss on his 1995 income tax return that would allow him to legally avoid paying taxes for 18 years.

Trump's lawyer Marc E Kasowitz wrote to The Times before it published the story threatening legal action and insisting that "any unauthorized disclosure, which publication by The New York Times would be, is illegal". But Trump never launched any legal action against the publication.

Kasowitz cited a federal law that makes it a crime "willfully to print or publish" federal tax return information.

The statute makes it illegal to publish an unauthorized tax return or "return information". Violation of it could lead to a fine of up to $5,000 and or a prison sentence of up to five years. The information covered by the law includes any financial information found on a tax form.

But how the information was gathered by a journalist is important. A case known as Bartnicki v Vopper decided in 2001 firmly establishes that criminal liability by the media isn't clear if it receives leaks from a private citizen. The case centred around a secret recording aired by a Pennsylvania radio station.

"A stranger's illegal conduct does not suffice to remove the First Amendment shield from speech about a matter of public concern," wrote Justice John Paul Stevens in the United States Supreme Court's majority decision.

The two-page portion of Trump's tax return, Maddow said, was mailed unsolicited and anonymously to Cay Johnston.