PORTLAND, Maine — The first time a same-sex couple asked Mary Bonauto to go to court to overturn a ban on gay marriage in 1990, she said no.

Bonauto said no many more times to other couples before she successfully argued earlier this year before the U.S. Supreme Court that bans on same-sex marriage were unconstitutional. She and others wanted to build toward marriage “brick by brick” by working for equal rights in other areas such as employment and adoption.

“We are living participants and witnesses to the journey for constitutional rights for LGBT people,” Bonauto of Portland said on Thursday night during the Frank M. Coffin Lecture on Law and Public Service, sponsored by the University of Maine School of Law, at the Abromson Community Education Center. Nearly 500 people heard Bonauto’s lecture, titled “Equality and the Impossible: Climbing the Arc of Justice.”

Danielle M. Conway, dean of the law school, said the event drew a record number of people outside the legal community. Law school students, faculty, alumni and Coffin’s former clerks also filled the auditorium.

The lecture series honors the late Frank M. Coffin, longtime federal judge on the U.S. 1st Circuit Court of Appeals, and focuses on public service law. Coffin, who died in 2009 at the age of 90, served on the court for more than 40 years.

Bonauto has been at the center of the movement toward same-sex marriage in the U.S. for more than two decades. Earlier this year, she successfully argued before the U.S. Supreme Court in the historic case Obergefell v. Hodges, establishing the freedom to marry for same-sex couples. Her lecture was a history lesson in the long legal journey to that moment.

In 1999, the Vermont Supreme Court ruled that same-sex couples were seeking marriage because of their “common humanity” with all other Vermonters, Bonauto said. The court, however, left the remedy up to the legislature. Lawmakers created same-sex unions but stopped short of marriage.

“Vermont’s triumph also was a bridge forward to the future,” she said. “It was clear that civil unions were not enough. In the next lawsuit [filed in Massachusetts] we made it clear that we were seeking marriage.”

The Massachusetts Supreme Court ruled for same-sex marriage in 2003. After legislatures in Maine, Vermont and other states approved gay marriage in 2009, the legal battle turned to the federal courts, Bonauto said.

At the same time, advocates worked to get a question on the ballot that led to Maine being the first state in the union where voters approved gay marriage in November 2012.

Bonauto said that she was surprised to learn less than a month before oral arguments before the U.S. Supreme Court in April that she was to deliver arguments and be peppered with questions from justices.

“When I objected, my friends said, ‘But, Mary, you’ve been preparing for it for 20 years,’” Bonauto said. “And, that was true.”

She said that the fight for equality is not over for the gay, lesbian, bisexual and transgender community.

“We must continue standing up for justice,” Bonauto said as she urged those in attendance, especially those still in law school, to engage in public service law.

Bonauto has worked for 25 years at the Boston-based Gay & Lesbian Advocates & Defenders. She was awarded a $625,000 MacArthur Foundation fellowship in 2014. it is a no-strings-attached award paid out in equal quarterly installments over five years. Bonauto said last week that she put some of the money she has received in college funds for her children and has given some away.

A crew making a documentary about the fight for gay marriage filmed Bonauto’s lecture.