A fireworks display has gone awry on the New South Wales Central Coast, with a barge catching fire and a beach evacuated.

The 9pm fireworks in Terrigal took a turn for the worst when the barge full of fireworks exploded.

Witnesses said thousands were evacuated when the fire broke out.

A barge containing fireworks exploded in Terrigal. (Twitter)

“It was a horrible experience,” Anooshe Mushtaq tweeted.

“We were right on the beach when it happened and we ran to the other side.

Thousands of people were evacuated. (Twitter)

“I escaped as soon as I saw the boat on fire. It was an absolute chaos.”

Police said two men on the barge suffered minor injuries and were treated at the scene before being taken to Gosford hospital for treatment

A barge containing fireworks exploded in Terrigal. (Twitter)

Cassandra Bonner, who was staying in an apartment overlooking Terrigal beach, said the explosion occurred about five minutes into the fireworks display.

"There were people everywhere on the beach and about five minutes into the fireworks presentation the fireworks all went off which didn’t look normal," Ms Bonner told 9NEWS.

"Then we saw a man on the boat with a torch waving and then the police had to go over in their boat and save the man and then all of a sudden the boat was on fire.

"There were so many people on the beach you couldn’t even see the sand. As soon as the boat caught alight the fireworks were still going off, but unexpectedly, and they were shooting off almost towards the beach.

"So everyone started bolting off the beach on to the road. People were panicking."

“The technicians ended up being blown into the water by an explosion,” Jordan Hyslop told 9NEWS.

“The fireworks continued at random, some horizontally, across the water towards the crowd,” Ainslie Drewitt-Smith tweeted.