Jim Egan may not be a household name for many Canadians, but to gay rights advocates, he’s a hero -- one who is now being celebrated with his own Heritage Minute, due to debut online Wednesday.

Egan spent decades living a quiet life with his life partner of 50 years, Jack Nesbit, but in 1995, his fight for equal rights went all the way to the Supreme Court.

He sued the federal government for discrimination after he was denied Old Age Security spousal benefits. He and Nesbit claimed that the definition of “spouse” in the Old Age Security Act violated the Charter of Rights because it discriminated against same-sex couples on the basis of their sexual orientation.

The Supreme Court dismissed their appeal of a lower court ruling on the case, but their decision expressly established that discrimination on the basis of sexual orientation was prohibited under the Charter.

It was a ruling that has been described as “losing the battle but winning the war,” and it was one that eventually paved the way for the legalization of same-sex marriage.

But Egan’s work to advance gay rights began long before that landmark case.

Almost 50 years before, at a time when homosexuality was illegal and openly degraded in most of Canadian society as “vile,” Egan began writing letters to Canadian publications to criticize their cruel and inaccurate portrayals of gays and lesbians.

Anthony Wilson-Smith, the president and CEO of Historica Canada, which produces the popular Heritage Minutes, says part of what made Egan special was that he was one of the first Canadians to write from a gay point of view.

“He really decided early on: ‘I’m not going to take this. I’m not going to put up with this idea of homophobia everywhere, that we’re some form of lesser human being,’” he told CTV News.

“So he sat down and got his typewriter out and every time he read something critical, saying homosexuals are this, or gay people are something else, he responded using his name. And nobody did that in those days.”

Change came slowly and Egan branched out into environmental advocacy work. When he entered municipal politics in Comox, B.C. in 1981, he was one of the first openly gay politicians in Canada.

But the 1995 Supreme Court ruling on their case set off a cascade of changes that eventually led to the legalization of same-sex marriage in 2005, five years after Egan and Nesbit’s deaths.

So much has changed since then that it might be hard for many Canadians to remember there was a time when the LGBTQ community had to hide in the shadows and didn’t have the rights they have now, says Wilson-Smith.

Yet few Canadians know Egan’s role in changing society’s attitudes. That’s why Historica Canada decided Egan would make the perfect subject for a Heritage Minute.

“We look for those stories of kind of ordinary people doing extraordinary things, who lift things up and that change the way that Canadians live and how they see each other. And certainly Jim Egan did that,” Wilson-Smith said.

“…We chose him thinking it’s a heck of a story, it’s a heck of an achievement ultimately, and yes, his name belongs in the history books.”

With a report from CTV News’ John Vennavally-Rao