As new cases of the coronavirus continue to increase in Philadelphia, city officials have extended a ban on indoor dining until at least Sept. 1, and are instructing residents to avoid visits to the Jersey Shore as well as 25 states with high rates of infection.

“The epidemic is likely to be worse before it gets better,” in Philadelphia, said Health Commissioner Thomas Farley.

Farley reported 142 new cases of the coronavirus in Philadelphia residents Tuesday, bringing the total number of confirmed cases to just shy of 30,000.

The city had an average number of 164 cases per day in the past week, Farley said, noting that the average is likely still to increase as lagging test results are reported. The prior week had an average daily total of 141 cases, he said, and the daily case count averaged 111 in the week before that.

Farley attributed the rising case count in part to increased testing, and said the positivity rate of tests in the past week was 5.2%. But, he added, recent spikes in the virus in other states appear to have spread to the Philadelphia region.

As the city attempts to contact trace new cases of the virus, Farley said that a number of residents reported trips to the Jersey Shore, where they participated in social gatherings. He also said many residents take mask wearing and social distancing seriously when shopping or at work, but not around family and friends.

“We all tend to trust our relatives and our friends so those are times when people neglect use of masks or neglect to distance from people, even if they’re sick,” he said.