The husband of journalist Glenn Greenwald, David Michael Miranda, was elected Sunday to Rio de Janeiro's city council.

Rio is Miranda's hometown. He is an LGBT activist in Brazil.

“Congratulations to Rio de Janeiro's newest City Councilman-elect: @DavidMirandaRio!!!!!!” Greenwald tweeted.

Greenwald is best known for his reporting on classified National Security Agency (NSA) documents leaked to him by former CIA employee Edward Snowden which revealed the agency's surveillance programs. He wrote about the programs for The Guardian and in a book titled No Place To Hide: Edward Snowden, the NSA, and the U.S. Surveillance State.

British officials detained Miranda for nine hours in 2013 at London's Heathrow Airport as he was boarding a connecting flight from Berlin to Rio. An encrypted hard drive said to contain documents related to Greenwald's reporting was seized by officials.

In 2011, Greenwald said that the Defense of Marriage Act (DOMA) prevented him from sponsoring Miranda for a U.S. visa. DOMA was found to be unconstitutional in 2013.

Miranda's term begins in January.