A former Air Marshal who was fired for leaking news that the government had been preparing to stop employing Air Marshals on overnight flights is eligible for whistleblower protection, the Supreme Court ruled Wednesday.

The Supreme Court decided in a 7-2 decision that former Air Marshal Robert MacLean did not break the law when he revealed the Transportation Security Administration (TSA)’s plan to save money on lodging by removing undercover agents from overnight flights.

This plan made headlines in 2003 when MSNBC published an embarrassing story the issue, which quickly ignited a wave of criticism aimed at the TSA. About one day later – after lawmakers in Congress also railed against the plan – the TSA reversed its decision.

READ MORE:TSA lashes out at whistleblower for revealing security breaches

When the agency discovered MacLean was the man behind the leak in 2006, it fired him for revealing sensitive security information. Lawyers for the government stated in court that MacLean violated internal TSA regulations against public disclosure of “aviation security measures,” the Los Angeles Times reported. Additionally, the government stated that whistleblower rules don’t protect those who disclose information “prohibited by law” or an executive order, specifically referencing the TSA’s regulations, according to the Associated Press.

We stand with U.S. Air Marshal whistleblower Robert MacLean. Do you? pic.twitter.com/YrYDDMTzJs — POGOBlog (@POGOBlog) November 4, 2014

However, the Supreme Court ruled that MacLean did not violate federal law, which does not specifically ban the former Air Marshal’s disclosure Writing the majority opinion, Chief Justice John Roberts said the TSA’s regulations do not carry the same power as written law, and that if the government wanted to prohibit MacLean’s behavior, there would have been legislation or an executive order addressing it.

“Although Congress and the president each has the power to address the government's concerns, neither has done so. It is not our role to do so for them," he wrote, as quoted by the AP.

Roberts added that since MacLean’s disclosure actually forced the TSA to change its stated policy goal of removing Air Marshals from flights, he is precisely the kind of whistleblower that the law is meant to protect, the LA Times wrote.

READ MORE:New racial-profiling rules don't apply to TSA, border security, Secret Service

The two dissenters were Justices Sonia Sotomayor and Anthony Kennedy, who argued that the majority is essentially allowing employees to determine what sensitive information they can reveal to the press.

Today is a great day for the United States. It's not perfect, but we have THE GREATEST justice system ever in history. God bless the USA!!! — Robert J. MacLean ✈ (@rjmaclean) January 21, 2015

For his part, MacLean told the Times he was “very honored and grateful that the Supreme Court decided the case. I’ve always believed with the information that I had, it was not illegal to do what I did. Violating an agency rule or regulation does not trump the federal whistle-blower protections laws.”

In order to win his job back, MacLean must now file for whistleblower protection and argue that his termination was linked to his disclosure.