Two gay couples who waged a five-year court battle to restore same-sex marriage in California are back in the spotlight, in a new film premiered at the Sundance Film Festival.

Paul Katami and Jeff Zarrillo, and lesbian couple Kris Perry and Sandy Stier, finally achieved their goal last June. But “The Case against 8” recounts the long and often dispiriting judicial battle they fought to get there.

The documentary, by filmmakers Ben Cotner and Ryan White, is in official competition at the independent film festival, which wraps up next weekend in the Utah ski resort of Park City.

The story begins on November 4, 2008 — the day Barack Obama became the first ever African American US president, but also the day Californians voted in a referendum on so-called Proposition 8 to outlaw same sex marriages.

The “Prop 8” decision came only a few months after the western US state’s top court had legalized gay marriage, and some 18,000 same-sex couples had already tied the knot before the referendum blow.

Gay rights campaigners acted immediately, creating the American Foundation for Equal Rights (AFER) to take the case to court, where they filed a first lawsuit in May 2009.

“We heard about the case very early on, before it was filed and we asked them about the possibility of making a documentary about it, without knowing that someday it would become a bigger case,” Cotner told AFP.

“At the time, we had no idea that it would go all the way to the Supreme Court,” he added.

As well as the roller-coaster legal fight — from the plaintiffs’ first court victory in San Francisco to the US Supreme Court in Washington — the film also focuses on the two couples at the heart of it.

The four became the face of gay marriage in California, putting huge pressures on them.

“I’ve never been so nervous in my life. Even though we’re ready, there is the weight of ‘I can’t mess this up. I have to represent so many people,'” Katami says in the film.

The two couples “never knew that the case would become so big and they didn’t know that they would become the cement of the story,” co-director White told AFP.

“But on top of that, the idea of having a documentary crew following them probably was not the thing that they wanted most at the beginning,” he added.

A third duo also plays a central role in the film: lawyers Ted Olson and David Boies, nicknamed “The Odd Couple” by the media.

The pair, who had been on opposing sides in the infamous legal battle which resulted in George W. Bush’s 2000 election win over Al Gore, united “to fight for LGBT rights together,” White said.

“That was the heart of the case and probably the heart of the film too,” he added.

Olson, a fervent Republican, drew harsh criticism for supporting gay marriage, even though, as he says in the documentary, “marriage is a conservative value.”

“It’s two people who love one another and want to live together in a stable relationship, to become part of a family and part of a neighborhood and part of our economy,” he said.

The filmmakers said they were careful not to get carried away by the strong emotions on both sides, over the five years.

But their objectivity was seriously challenged when the US Supreme Court restored the right of gays to marry in California, on June 26 last year.

“Two days later, we were at the weddings and that day was the hardest day to film because it was so hard for me to concentrate on the film,” said Cotner.

“I just wanted to be a part of the wedding with them. “I didn’t want to be a filmmaker at that moment. I wished I was just a participant at the wedding,” he said.