Denicia Gray stood solemnly in Brockton Superior Court on Friday alongside 24 others as they took an oath to become naturalized citizens of the United States.

Afterward, it was all hugs and jubilation as the group celebrated the achievement with family and friends.

“I’m excited for how this will help me on my journey,” she said, holding the legal documents that show she’s now a citizen. “I definitely think this gives me more opportunities.”

The 18-year-old, who left her native Jamaica eight years ago, graduated from Brockton High School in 2012 and plans to study nursing.

The 25 new Americans hail from seven countries. which include Angola, Brazil, Cape Verde, Haiti, Jamaica, Nigeria and the United Kingdom, but make their homes in Brockton, Stoughton, Dorchester, Holbrook, Bridgewater and Plymouth.

The ceremony was part of the U.S. Citizenship and Immigration Services celebration of Flag Day. Around the country, more than 3,600 foreign-born men and women became citizens in 69 special ceremonies commemorating the holiday.

Most naturalization ceremonies in Massachusetts are held in Boston, sometimes at TD Garden, and thousands of people take the oath at once.

“The local citizenship ceremonies are special because they’re becoming citizens in their own community,” said Juliana Langille, executive director of Community Connections of Brockton, adding this was the first ceremony held in the city for at least a decade.

“It’s hugely empowering,” Langille said. “Now that they have citizenship they have more of a stake in their community.”

Langille’s organization has worked with the Massachusetts Immigrant and Refugee Advocacy Coalition hosting citizenship clinics in downtown Brockton providing more than 500 local residents eligible for citizenship the tools to become citizens.

Joy Riley, 48, also formerly of Jamaica and who was among many who registered to vote after the ceremony, said she already felt as though she has more of a voice and looks forward to casting her first ballot.

“At any given time, 8 to 10 percent of the population is foreign-born,” said Director Ken Sherman of the Boston field office for citizenship and immigration services. “They’re part of what will shape America’s future.”

He said it’s a pleasure when they can do smaller ceremonies because they have more warmth and intimacy, adding that it’s especially rewarding when local officials can be involved.

State Rep. Christine Canavan, D-Brockton, and Mayor Linda Balzotti spoke during the ceremony, sharing their immigrant heritage and congratulating the new citizens on their hard work.

“I did not come from wealth or means. I just came from two parents who worked very hard and raised us well,” Balzotti said, “I tell you that to encourage you and to not let obstacles get in your way. Take this opportunity and continue to make it grow.”

Page 2 of 2 - Plymouth County Superior Court Judge Richard Chin, himself the child of Chinese immigrants who became citizens in the same courthouse decades earlier, presided over the ceremony.

“Today you become United States citizens, but always remember where you came from,” he told those taking the oath of citizenship. “We are a country of immigrants, and our diversity enriches our society.”