Coronavirus took direct aim at the tourism economy in Cape May County, but beach communities rebounded somewhat in July, tourism officials said Tuesday.

Tourism losses based on New Jersey occupancy tax revenue showed a 42% decrease from 2019 through July, closing a year-to-date gap that was 60% through June, officials said.

(The occupancy tax represents 5% of the room rate and includes hotels, motels, and bed and breakfasts, but not rentals and campsites.)

In July, $2.6 million in taxes was collected, a $1.6 million increase over June and more than the total collected through the first six months of 2020, said Diane Wieland, director of the county’s department of tourism. While the number falls short of last year’s July taxes by $760,849, Wieland said, “Cape May County fared well statewide due to the high demand in beach and outdoor activities.”

“The COVID-19 shutdown came at a critical time for our tourism industry,” said Gerald Thornton, Cape May County freeholder director. “After coming off a record 2019, with direct tourism spending at $6.9 billion and indications that the county was well on its way to another record year, the bottom fell out and there was nothing we could do but assist small businesses in applying for state and federal loans and programs.”

Also impacting the Shore communities was the closing of the U.S.-Canadian border, which prevented Canadian travel, usually 7% of summer visitors.

On the upside: Renewed interest in RVing boosted the county’s campground industry, Wieland said.The county is also hoping for a strong fall with some summer residents staying put and working remotely, buying homes, or even enrolling their children in local schools.

Reflecting on the turbulent summer, North Wildwood Mayor Patrick Rosenello said he thought beach towns, with the exception of Atlantic City, overreacted by closing boardwalks and beaches initially in response to the pandemic.

But once outdoor dining was permitted in mid-June, and indoor retail, many businesses were able to take advantage of the large crowds, he said, with enhanced outdoor spaces and blocked-off streets that will likely become permanent.

“The crowds down here were huge,” Rosenello said. “It started Memorial Day weekend and every weekend then on out was a holiday weekend. The people were absolutely here.

“There were winners and losers,” he said. “If you had a facility with ample outdoor space to expand into, you had a much better chance of survival. If you had a business that relied on foreign workers, if that was baked into your business model, you had a lot of trouble. Some people did fine this summer. Others struggled to get 40% to 50% of gross revenue.”