PORTLAND, Maine — A man who was shooting off fireworks for the city’s Fourth of July celebration was injured Thursday when one of the fireworks misfired and hit him, Portland spokeswoman Nicole Clegg said Friday.

The man, whose name Clegg would not disclose, works for Atlas Fireworks Co., which is based in Jaffrey, N.H. His injuries weren’t life-threatening.

“We’ve used [Atlas Fireworks] for a number of years,” said Clegg.

Three people were on a barge in Casco Bay shooting off the fireworks, which were postponed from Wednesday to Thursday because of poor weather conditions.

Clegg said the city decided to have the fireworks shot off a barge this year so more spectators could see the display.

“Shooting on land, we had to restrict a section of the Eastern Promenade,” she said.

The display attracted an estimated 30,000 spectators, according to Clegg, which was down from about 60,000 in 2011.

“It was a workday. It was probably more complicated for folks,” she said. “We were pleased with the turnout.”

With rescue personnel on the water in the city’s fireboat, authorities were able to reach the injured man rather quickly, Clegg said. The fireboat took the injured man to the Maine State Pier and an ambulance took him to nearby Maine Medical Center.

BDN sports freelancer Ryan McLaughlin grew up in Brewer and is a lifelong fan of the New England Patriots, Boston Red Sox, Boston Celtics and Boston Bruins.