Before Glenn Greenwald was the journalist who broke and defended the most important story of 2013, he was many other things: an underage South Florida politician, a lawyer at a high-powered corporate firm, Kips Bay’s most combative tenant, and even the legal arm of his business partner’s gay porn distribution company.

Greenwald is a man of superficial contradictions: Brazil’s best-known American blogger, and a high-profile beneficiary of Wednesday’s Supreme Court ruling that will allow binational couples to live legally in the United States. He’s one of the internet’s prickliest characters, though by all accounts a man of great personal charm and warmth.

But at this moment, Glenn Greenwald is, first of all, a major supporting player in the new century’s definitive spy thriller, a kind of unfinished John Le Carre novel. A 29-year-old government contractor finds proof of invasive NSA spying programs. He abandons a comfortable life in Hawaii to expose them, fleeing to Hong Kong and teaming up with intrepid reporters he believes he can trust, including the Guardian’s Greenwald.

If Greenwald’s role in one of this decade’s signature international dramas is any guide, perhaps the most striking thing about the 46-year-old is his consistency. Greenwald is a rare man of inflexible principle in an online conversation dominated by flexible partisans. He’s a civil libertarian for whom LGBT equality, a Nazi’s right to free speech, and freedom from government surveillance are bound by a common thread; and he’s a brutal and tireless combatant with everyone from President Obama’s Twitter legions to George W. Bush.

For Greenwald, the Guardian’s Edward Snowden-sourced series is career-defining. It also represents a rare and pure vindication for a figure long viewed even by many on the left as a difficult eccentric. There may be an emerging consensus on out-of-control government power and secrecy. Greenwald was always there. And people who have known Greenwald for years say his defining characteristic may be that he has never changed.

“If Glenn feels he’s right about something, he doesn’t care if the entire world hates him,” said David Elbaum, who worked for Greenwald’s law firm a decade ago.

Before he helped Snowden publish the Obama administration’s surveillance skeletons — before he wrote on his blog about President Bush’s surveillance skeletons — Greenwald was a determined young lawyer. His career began in 1994 at Wachtell Lipton Rosen & Katz, known as perhaps the most lucrative and hardest-charging in New York’s brutal corporate legal world. He was still enrolled then at NYU’s School of Law, where he became known for leading a successful campaign to ban Colorado firms from recruiting on campus after voters in the state approved an amendment overturning anti-discrimination laws. He had a dozen job offers, but Greenwald — who came out around 1986, while he was a philosophy major at George Washington University — decided to accept a junior associate position at the high-powered Wachtell Lipton because it offered civil union benefits.

“It wasn’t the monetary value,” Greenwald said. “It was just the symbolism for me.” And so Greenwald spent the next 18 months representing investment bankers and Goldman Sachs.

When she first met him, Elaine Golin, then a summer associate at Wachtell Lipton, thought Greenwald was “scary — but then I quickly realized that the scariness probably had to do with his short haircut and his intense stare.” Like others, she was drawn to his sense of humor, his desire to “always be a little bit outrageous,” and his fighting spirit. They would debate. Greenwald, it seemed, was born to debate, play the underdog, and win.

Gradually, though, the symbolism that drew him to the giant corporate firm ran dry.

“If I had to do that one more day, I was going to jump out the window,” Greenwald said. “I knew that I didn’t want to be representing rich people. I wanted to be suing them.”

It was in Greenwald’s professional frustration that he found Townhall, then a conservative politics forum on CompuServe sponsored by National Review and the Heritage Foundation, via his roommate’s boyfriend’s Republican mother.

“At the office, he’d have his door shut and be smoking at his computer, and I’d say, ‘Glenn, what are you doing in there?’” Golin recalled. “He’d say, ‘I’m arguing with someone in Florida!’ Back then, it was like, ‘What? How do you argue with someone in Florida?’”

It was fun for Greenwald, who didn’t (and doesn’t) consider himself a Republican, Democrat, or Libertarian, though the latter is a label often ascribed to him. But it also taught him something about political debate. It was the first time he’d fight with people on the internet — and then, eventually, at an event organized for forum members in Indiana, feel the awkward peace of meeting a virtual enemy IRL.

“We’d go in there to torment the conservatives,” he recalled. “But the more I started doing it, the more I got drawn into the conversations. I stayed there for two years and made friends with all these people … I argued with them, debated with them. I was totally openly gay, and they were very accepting. It was an eye-opening experience, and it taught me not to make assumptions about who people are.”

Greenwald has been a careful observer of politics since his childhood in Lauderdale Lakes, Florida, where he watched his grandfather serve as a city councilman. In high school, he joined the debate team, and during his senior year, at 17, he decided to run for city council.

“In high school I was always a little … I forged my own path,” he said.

But Greenwald learned — after two unsuccessful campaigns before the age of 25 — he wasn’t cut out for politics.

“My grandfather would try to represent poor homeowners against the powers that be in the city. He taught me that whatever skills you have should be devoted toward undermining the people who are the strongest and most powerful,” Greenwald said. “In politics, you need a desire and ability to please large numbers of people. That’s definitely not in my interests and not what I do well.”

And so he went to law school, funded by student loans and former summer jobs as a Red Lobster busboy and hotel desk receptionist. And at age 28, he left Wachtell Lipton to start his own firm.

It was reckless, he admitted; he had no idea what he was doing. There were times when he thought about going back. One of his first solo cases — “shitty cases,” as he calls them — was representing a Wachtell Lipton partner’s secretary who was fighting with a neighbor who had accused the secretary of having an affair with her husband. Greenwald represented the secretary and sued the neighbor for defamation, and the case settled.

“She ended up paying money that she didn’t really have,” he said. “I feel guilty about that to this day. I so excessively litigated it. I was just, like, drowning this poor woman with all kinds of legal papers.”

The cases got less “shitty” and more fulfilling. Greenwald helped win a $1.8 million settlement for Wendy Norville, a nurse at Staten Island University Hospital who, at age 54, injured her back while trying to keep a patient from falling off his bed. Norville, a Caribbean immigrant who put herself through nursing school, was fired from the hospital after nearly two decades for “incompetency.”

Greenwald also spent roughly five years defending the First Amendment rights of neo-Nazis, including Matthew Hale, the “Pontifex Maximus” of the Illinois church formerly known as the World Church of the Creator, one of whose disciples went on a murderous spree in 1999.

“I almost always did it pro bono,” Greenwald said. “I was interested in defending political principles that I believed in. I didn’t even care about making money anymore.”

Greenwald also litigated on behalf of himself and his then partner, Werner Achatz. In 1994, they had been looking for an apartment in Manhattan together, and one landlord — at a building on 29th Street and Third Avenue — required a certain income minimum to be met for rental applicants. Greenwald and Achatz didn’t meet it separately, but together came well above it. The landlord didn’t accept that, because they weren’t married, because they couldn’t be married. Greenwald eventually asked his father in Florida to co-sign on the lease, “which was demeaning and outrageous,” he said. They moved in, and Greenwald promptly sued their new landlord. He settled the case for about $20,000, but not before racking up the landlord’s legal bill.

“They ended up firing their legal team,” Greenwald said, a move that might have had something to do with a days-long, 500-page deposition that Greenwald put the opposing counsel through. “I was obnoxious. I refused to answer their questions.”

The deposition, in fact, is a case study in Greenwaldian debate. One section, in particular, has echoes of a short statement Greenwald published Wednesday in an attempt to pre-empt a New York Daily News dive into his legal history.

That deposition is also, as Greenwald now admits, pretty ornery. A sample may conjure for some of Greenwald’s later readers a writing style that mixes rhetoric and brute force:

Greenwald [speaking to opposing counsel Andrew Bernstein after coming back from a recess]: Before we continue, I’d just like to note for the record that this is the third time that you’ve returned to the deposition significantly later than the time that you said the deposition would resume. The first time that this occurred was yesterday when the deposition was scheduled to begin at 9:30. I arrived punctually at 9:30 and waited 20 minutes for you to arrive. The second time was yesterday during a break at approximately the same time in the morning when you arrived ten minutes late after the time that you had indicated the deposition would resume. The third time was just now when you’ve arrived again about ten minutes late for the deposition to resume, which means that approximately 45 minutes of deposition time has been squandered as a result of your inability to resume the deposition or to commence the deposition on time. And I would just like to note for the record that in the event that you need an additional day in addition to today, which was an unplanned and unnecessary additional day for deposition, for time to depose me, that the fact that you’ve wasted 45 minutes by being late compounded by the fact that you’ve spent most of the deposition time asking questions which are patently irrelevant, will certainly be a substantial reason why you are not entitled to any more deposition time of my time for the purpose of deposing me.

Bernstein: Let me first start off and note for the record, Mr. Greenwald, that you have this wonderful flare of making broad sweeping generalizations without any attention to detail … You have been completely obstructionist and unwilling to answer questions; that has necessitated this deposition taking a lot longer than need be … Just because you view a certain issue one way does not make it the be all and end all.

Greenwald: Mr. Bernstein, I’ll just note that if you would like to have a court decide whether or not I ought to be compelled to answer questions that you’ve asked, such as whether or not I’ve been romantically involved with a roommate that I had for three months six years ago in Atlanta, Georgia, or questions pertaining to the sexual orientation of individuals who have absolutely nothing to do with this litigation, or what clubs I was in eight years ago in college, feel free to go to the court and explain to the court why you believe that questions, such as that, which are intrusive and vexatious, have relevance to this litigation and I ought to be compelled.

In 1997, Achatz and Greenwald filed another lawsuit for broken elevators in their building. (They lived on the 32nd floor.) They later moved into another building in Midtown Manhattan, and countersued after being sued by that landlord for having a dog that weighed more than 35 pounds. They sued American Airlines and its parent company for not placing the right number of miles flown in their frequent-flier account.

Personal lawsuits aside, by 2000, Greenwald was practicing full-time with his name on the door of his own three-man firm.

“We were constantly underestimated by big firms,” said Elbaum, who was Greenwald Christoph’s associate attorney. “But they had no idea who they were up against. We worked our asses off. We worked every Sunday, and then hit the ground running on Monday … These distinguished gray-hair litigation partner types underestimated [Greenwald] and then grew to loathe him. We’d see them in court just losing their shit.”

Mona Holland, a lawyer who partnered with Greenwald in the late ’90s, recalled a similarly intense work ethic.

“He decreed that during the week, even if we didn’t have to appear in court, we would be ‘suited up.’ He felt it promoted a proper work ethic,” she said. “My dry-cleaning bill didn’t like this notion.”

Greenwald said he called on his experience as a litigator when he first spoke to Snowden.

“When I got to Hong Kong, my immediate priority was to kick the tires as hard as I could on his story and see if there was anything that he was hiding,” Greenwald said. “I spent five or six hours just relentlessly questioning him, using the same tricks that I used to use in depositions.”

But despite his skill and ease as a litigator — or maybe because of his skill and ease — Greenwald grew bored with it. In 2002, he started a consulting company, Master Notions LLC, with his best friend, a Los Angeles film producer named Jason Buchtel. Greenwald mostly handled legal matters and contracts.

“I had no interest in business and entertainment. I was just looking around for what I was going to do next,” Greenwald said.

He assisted on the production of a movie, Showboy, a 2002 mockumentary about a fired Six Feet Under writer, and once consulted on a company’s development of “some doll that was supposed to comfort people who had anxiety issues.”

Buchtel, who did not respond to interview requests, also worked in the adult entertainment industry, identifying himself in one court affidavit as the president of “MN” (Master Notions) Entertainment: “We sign various producers to distribution contracts which furnish us with the right to distribute their videos for both wholesale and retail distribution.” According to court documents, one of the distribution websites operated by MN Entertainment was StudMall, a gay porn DVD site. According to the New York state corporation and domain registry records, MN Entertainment and Stud Mall operated out of the same suites that housed Greenwald’s law firm, but Greenwald said he was just the company’s legal and consultancy arm.

Greenwald — who bridled Wednesday at the Daily News’ coverage of the porn tie — denied he was involved in any production of the adult videos. There was only a “corporate interest.”

“But if I were, I’d be proud of it,” he told BuzzFeed. “There’d be nothing wrong with it.”

After two years, Greenwald said, he was bought out of the company. He had gradually stopped taking on new cases, and his relationship with Achatz had ended. He decided to take a vacation to Brazil.

“I was going to take two months off, come to Rio, take my dog with me, and figure out what I wanted to do next in my life. I didn’t have any plan at all.”

On his second day there, he met David Michael Miranda, then 19, on the beach.

“We instantly fell in love. We just knew from the moment that we met. We had this really intense bond. Once that happened, I knew he couldn’t come and live in the U.S. with me, so my only choice was to stay in Rio. That kind of forced me to give up my law practice and figure out what came next.”

One day in October 2005, “sort of spontaneously,” Greenwald started a blog. A few weeks later, news broke that President Bush had authorized the NSA to eavesdrop on Americans following Sept. 11. Greenwald learned everything he possibly could about the case and then wrote about it. By the end of that year, Slate was citing Greenwald’s blog. He became a columnist for Salon in 2007, then was hired by the Guardian in 2012.

Greenwald still lives in Brazil, in Rio’s Gavea neighborhood, on a permanent visa with Miranda and their 10 rescued dogs. On Wednesday, the Supreme Court ruled that the Defense of Marriage Act was unconstitutional, and that the federal government must recognize same-sex marriages that are already considered legal by states. This changes things for the couple.

“I’m not saying that we’re gonna pack our bags tonight and move to the U.S. tomorrow. It’s a really complicated decision,” Greenwald said. “But we feel extraordinary. This is the decision that we’d been hoping to have for eight years now.”

For now, Greenwald’s professional work requires more attention than this major personal-life development. The NSA series is still going after beginning in early June. When they met, Snowden supplied Greenwald with a “volume of documents so great that I haven’t actually gone through them all.” Snowden was meticulous — Greenwald described the files as beautifully organized, “almost to a scary degree.” Stories based on the leaked documents will continue for another few months, Greenwald said, but not, he hopes, beyond that.

“I get bored with myself,” he said. “If I’m still working on these stories a year from now, I’ll probably be in an asylum somewhere.”