Belmar, N.J., Mayor Matt Doherty temporarily barred nonresidents from entering the community through a major highway Sunday because it "reached capacity" with an outpouring of tourists, reported the Associated Press.

Doherty announced on Twitter that traffic into the town from Route 35 was "shut down immediately" because it "reached its capacity." He wanted to ensure public safety.

The 1.6-square-mile beach town has an estimated population of 6,000 people, but swells to more than 60,000 in the summer, reported WGN TV.

More than 20,000 people visited Belmar Sunday to participate in the last day of the New Jersey Seafood Festival, held at Silver Lake Park, and to visit local beaches.

Belmar residents were able to bypass the road closures by showing their driver's license.

"We kind of lucked out that it didn't really affect us that drastically. Between the people leaving the beachfront and people driving through Main Street, we've been pretty steady," said John Sentner, the manager of Connolly Station.

Later, the same day, the mayor announced the reopening of the highway.