“Never let anyone silence your voices,” Hillary Clinton said on Thursday in a speech to the graduating class from Medgar Evers College at Barclays Center in Brooklyn. She called on graduates to uphold the legacy of civil rights leaders.CreditChang W. Lee/The New York Times

Her speech, however, was still pointedly political. Acknowledging the diversity of the Medgar Evers student body and of Brooklyn, Mrs. Clinton called on graduates to uphold the legacy of figures like the slain civil rights leader for whom the school is named, by fighting for voting rights and standing up against the rise of hate crimes.

“Never let anyone silence your voices,” she said. “Make your voices heard every single day. And when they even try to dismiss your lived experiences, maybe they’ll call it ‘identity politics,’ stand up and say your identity is as important and valuable as the identity of anybody else who lives in the United States of America.”

Though she never named President Trump, her address was filled with thinly veiled references to his administration, its policies and its controversies. Speaking of Medgar Evers College, which was founded in 1970 in the Crown Heights neighborhood, she said: “It opened during a period of tumultuous change in America. The Selma and Montgomery marches had taken placed just five years earlier. We were facing assassinations, political turmoil, investigations.” Here she paused for effect.

Calling the class an “inspiring group,” she said: “You come from 94 countries, speak 44 languages. You embody what makes New York and America great already.”

Roughly 1,300 Medgar Evers College students were in this year’s graduating class, and many were nontraditional students raising families — and many come from immigrant households. The oldest graduate, as Mrs. Clinton mentioned, was 75. The youngest was 17.

The area around the school in Crown Heights has a large Caribbean population. The graduates’ mortar boards were decorated with the colors of Caribbean flags, and at least one family in the audience waved flags from Jamaica. The students who spoke at the ceremony mentioned families in Trinidad and Tobago, Barbados and Ecuador.

Image

Graduating students decorated their hats with country flags and messages.CreditChang W. Lee/The New York Times

Like many in his class, Jonathan Arcentales, the valedictorian, is the first in his family to graduate from college. His parents, a housekeeper and a construction worker, are from Ecuador.

In an interview, Mr. Arcentales, 22, praised what he called Mrs. Clinton’s “plain dedication.” “I understand that she doesn’t come from the same social class that I did — because my family comes from poverty,” he said. “But what she shares with all of us graduates is that she worked hard and has a positive attitude.”

At Wellesley, Mrs. Clinton, 69, was given a hero’s welcome. At Medgar Evers, the reception was slightly cooler. When asked to stand for the speaker, at various points several dozen rows of people stayed in their seats. There were scattered boos.

One graduate, Oluwatobi Olufeko, said: “I’m personally not excited. I honestly don’t think she’s done much for the black community. Her husband in his time as president passed a bill that incarcerated a large number of black males.”

Ms. Olufeko, 20, was born and was raised in Brooklyn by Nigerian parents, and she will go on to study neuroscience at the State University of New York at Stony Brook. She said there were many graduates who shared her opinion on Mrs. Clinton and her invitation to the ceremony. “We’re not upset, but we’re not excited.”

Outside Barclays, protesters from a Haitian organization, Committee to Mobilize Against Dictatorship in Haiti, or Komokoda, spoke out against what they said was the Clinton Foundation’s misuse of funds intended for earthquake victims in 2010 and held up signs with slogans like “Hillary Clinton: Not a Role Model for Black Youth.”

In the arena, where a large photograph of Mr. Evers hovered on a screen, Mrs. Clinton and Medgar Evers’s daughter Reena Evers-Everette spoke of a long friendship between the two families. Mr. Evers’s widow, Myrlie Evers-Williams, could not attend because of medical issues, but prepared a video message in which she praised Mrs. Clinton. “You are coming into a world that is torn today,” said Ms. Evers-Williams, a former leader of the N.A.A.C.P. “We do have people who are fighting for justice, for peace,” she said. “Who can better represent that than Hillary Clinton?”

Mrs. Clinton received an honorary doctorate during the ceremony.

If some were underwhelmed by the college’s choice of speaker, many in the audience were moved to see Mrs. Clinton get back onstage, and so close to their sons and daughters. “It’s amazing, amazing,” said Marcia Tisson, 55, originally from St. Lucia.

Ms. Tisson raised two daughters while working as a babysitter. The oldest, Paulina Tisson, was graduating at 32; her two children were there to watch her cross the stage. The elder Ms. Tisson said she had been despondent the night she learned the election results, and thrilled when she heard Mrs. Clinton would be speaking at the commencement.

“I’m so proud of her,” she said, pulling her crimson scarf tight around her shoulders. “She is a strong woman. She is like me.”

Mrs. Clinton herself gave her defeat only a passing mention. “Oh, I’ve had a few setbacks in my own life, and losing an election is pretty devastating, especially considering who I lost to,” she said to roaring applause. “But even that pales in comparison to what Myrlie went through, and frankly what a lot of people go through every day.”

A version of this article appears in print on , on Page A25 of the New York edition with the headline: Stand Up for Your Identity, Clinton Tells Graduating Class in Brooklyn. Order Reprints | Today’s Paper | Subscribe