AMHERST, N.Y. — Justice Ruth Bader Ginsburg gave University at Buffalo law students a memorable start to the new academic year Monday when she accepted an honorary degree on campus and talked about her dedication to equal rights and the “Notorious R.B.G” nickname.

The 86-year-old justice recently completed radiation therapy for a cancerous tumor on her pancreas, but said she did not want her health problems to stop her from fulfilling a commitment she made last year to a fellow Cornell University alumni and lawyer, Wayne Wisbaum, who has since died.

“I didn’t know this day would be preceded by three weeks of daily radiation,” Ginsburg said later during an event for the area legal community, “but I said ‘I will not cancel Buffalo.’”

The Supreme Court announced Friday that Ginsburg underwent outpatient radiation therapy beginning Aug. 5. It said there is no evidence of the disease remaining.

Before a capacity crowd of about 1,700 at UB’s Center for the Arts, the court’s oldest member mused over her celebrity status, evident in “Saturday Night Live” parodies, T-shirts bearing her image, a CNN documentary and the movie, “On the Basis of Sex.”

“It was beyond my wildest expectation that I would one day become the notorious R.B.G,” the justice said to applause and cheers while accepting an honorary law degree.

She called her contributions to gender equality “exhilarating.”

“The progress I have seen in my lifetime makes me optimistic for the future,” Ginsburg told the audience of mostly students and faculty. “Our communities, nation and world will be increasingly improved as women achieve their rightful place in all fields.”

Final year law student Abisha Vijayashanthar said she came away inspired.

“Are you kidding me? She’s a woman, a legend, the Notorious R.B.G.,” Vijayashanthar said. “I think she gives us hope and that’s exactly what we need today.”

Ginsburg was appointed by President Bill Clinton in 1993. Her health is watched closely as the leader of its liberal wing. She has now been treated for cancer four times over the last two decades.

Addressing about 2,200 members of the legal community at Kleinhans Music Hall, Ginsburg said she opposed proposals to expand the number of justices on the Supreme Court, referring to it as court-packing and lamented the bipartisan atmosphere in which judges are confirmed.

“I hope one day that there will be people who care about our country, both Democrats and Republicans, who come together and say enough of this dysfunctional legislature,” she said to applause.