Twenty-six people received their United States citizenship today in a special place and on a special date — on the historic USS Constitution after a three-hour Fourth of July sail in Boston Harbor.

The citizens, from 18 different countries, were sworn in at 3 p.m., said Lieutenant Commander Paul Brawley, a Navy spokesman. A total of more than 500 people were aboard.

The ceremony, a formal court hearing before US District Judge William G. Young, included a performance of the national anthem, speeches, and an audio message from President Obama welcoming the new citizens, said US Citizenship and Immigration Service spokeswoman Paula Grenier.

Advertisement - Continue Reading Below

Everyone on the ship was delighted to see the ceremony and welcome the 26 to official citizen status, said Grenier.

In a telephone interview from the ship, Brawley described the cool winds (which could be heard whooshing in the background) and the sunny skies above.

The ship fired a 21-gun salute at Castle Island in honor of the nation. “Old Ironsides” then headed towards the Boston Coast Guard station, where it fired a 17- gun salute in honor of the city of Boston, Brawley said.

“It’s a memorable experience,” said Brawley. People “are having a wonderful time.”

The ship returned to its dock at the Charlestown Navy Yard and will reopen to visitors at 6 p.m.