John Kiriakou, the 14-year former CIA veteran sentenced to two-and-a-half years in federal prison after disclosing the agency’s torture program, was released Tuesday to serve the rest of his sentence under house arrest.

Kiriakou was sentenced to 30 months in federal prison over his decision to reveal details about the CIA’s post-9/11 torture tactics to the press, a disclosure that also leaked the name of a covert officer. His sentence began February 28, 2013, at the Loretto Federal Correctional Institution near Pittsburgh, Pennsylvania and will officially finish in August 2015.

In a tweet posted Tuesday, Kiriakou is seen smiling with his children. He referenced Martin Luther King Jr. in the post, writing, “Free at last. Free at last. Thank God Almighty. I'm free at last.”

Free at last. Free at last. Thank God Almighty. I'm free at last. MLK Jr (and John Kiriakou). pic.twitter.com/hoPgbjFyAZ — John Kiriakou (@JohnKiriakou) February 4, 2015

Kiriakou first revealed details about the CIA’s torture program – such as the agency’s use of waterboarding – back in 2007, during an interview with ABC News. He was the first official with direct knowledge of the program to discuss the program in public.

The criminal investigation that eventually led to Kiriakou began in 2009, when government officials learned that defense lawyers for high-profile Al-Qaeda suspects at Guantanamo Bay, Cuba, were identifying witnesses to their clients’ interrogations while in CIA custody. The lawyers wanted to make the case that the government tortured their clients, and wanted someone involved to testify.

During an FBI investigation, authorities discovered that back in 2008, Kiriakou had told a journalist the name of a covert CIA officer involved in the interrogations of the Al-Qaeda suspects. The journalist then disclosed the covert officer’s name to a researcher working for a lawyer at Guantanamo. With the name of an officer involved in the torture program in hand, Guantanamo lawyers were able to name the officer in their lawsuits.

READ MORE: 10 most shocking facts we found in CIA torture report

News of this leak led to an uproar within the CIA, which filed a crimes report. The case cleared defense lawyers and the researcher of any wrongdoing, but Kiriakou was indicted in 2012 on one count of violating the Intelligence Identities Protection Act, three counts of violating the Espionage Act, and one count of making false statements. He agreed to plead guilty to the IIPA violation last October – the first successful IIPA prosecution in 27 years.

Defense lawyers argued that Kiriakou’s actions – giving a journalist the name of a former CIA officer alleged to have taken part in waterboarding – were those of a whistleblower.

READ MORE: State Dept. contractor to go to jail under Espionage Act for tipping off journalist

As a CIA officer from 1990-2004, Kirakou led an operation that captured Abu Zubaydah, a suspected Al-Qaeda facilitator in 2002. Zubaydah was subjected to waterboarding – simulated drowning – 83 times during interrogation, according to CIA records.

Prosecutors argued Kiriakou was merely seeking to increase his fame and public stature by trading on his insider knowledge. He later worked as a consultant for a US news network and published a book about his time at the CIA.

READ MORE: CIA whistleblower to Snowden: ‘Do not cooperate with the FBI’

While he was convicted for leaking the name of a covert officer, Kiriakou said he was really being targeted for revealing the torture program to the public.

"I am unbowed, unbroken, uninstitutionalized & ready to fight. Thanks for being there for me these past 2 years." -@JohnKiriakou — Kevin Gosztola (@kgosztola) February 4, 2015

“In truth, this is my punishment for blowing the whistle on the CIA’s illegal torture program and for telling the public that torture was official US government policy,” Kiriakou said in a May 2013 letter from prison. “But that’s a different story.”

READ MORE: CIA whistleblower imprisoned despite prosecutor's promise

Kiriakou said he intended to spend his time in prison exercising and writing, but also wanted to use the attention the case has afforded him afterwards.

"The justice department has made me a hero in the human rights community," he said. "I intend to use this notoriety."