Florida reported a record number of coronavirus cases on Saturday, the latest sign that the virus is surging in many parts of the United States, casting a pall over Fourth of July celebrations.

Officials and health authorities warned people to take precautions or simply stay home on Independence Day, as confirmed cases are climbing in 40 states. The U.S. set another daily record Friday with 52,300 newly reported infections, according to the tally kept by Johns Hopkins University that is widely thought to be an undercount.

More Images
A group of people, wearing face masks to prevent the spread of the coronavirus, walk along a beach path on Miami Beach, Florida's famed South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Florida reported a record number of coronavirus cases on Saturday, the latest sign that the virus is surging in many parts of the United States, casting a pall over Fourth of July celebrations.

Police officers riding all terrain vehicles patrol Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Alabama this week also set a record for infections reported in a day, with more than 1,700 new confirmed cases recorded Thursday, and state health officials worried that the holiday weekend could lead to the type of spike that followed Memorial Day weekend.

A mannequin wearing a mask is displayed with another outside a store on Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Many communities canceled those events and cautioned people against gathering on their own.

A tour group riding Segways rides down Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

In Britain on Saturday, some signs of normalcy returned with pubs and barbers reopening for the first time in months.

Parade goers are reflected in a storefront window posting a sign for customers to wear face masks before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers are reflected in a storefront window posting a sign for customers to wear face masks before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers draped in American flags walk down the street before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers draped in American flags walk down the street before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

A man carries beer at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries beer at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries drinks at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries drinks at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

Florida reported 11,445 confirmed infections on Saturday, bringing the statewide total to more than 190,000.

A group of people, wearing face masks to prevent the spread of the coronavirus, walk along a beach path on Miami Beach, Florida's famed South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

A group of people, wearing face masks to prevent the spread of the coronavirus, walk along a beach path on Miami Beach, Florida's famed South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Alabama this week also set a record for infections reported in a day, with more than 1,700 new confirmed cases recorded Thursday, and state health officials worried that the holiday weekend could lead to the type of spike that followed Memorial Day weekend.

“I’m really, really worried about the Fourth of July," said Dr. Don Williamson, a former state health officer who now heads the Alabama Hospital Association. “I think that will likely determine the trend for Alabama for the rest of the summer.”

The sobering updates came as local officials and health experts across the country tried to minimize opportunities for the virus to continue spreading on a holiday weekend typically spent swimming, eating at backyard gatherings or crowding elbow-to-elbow to view parades and fireworks shows.

Police officers riding all terrain vehicles patrol Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Police officers riding all terrain vehicles patrol Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Many communities canceled those events and cautioned people against gathering on their own.

In Florida, bars statewide are shut down and some regional attractions, such as Zoo Miami and Jungle Island, have closed. Officials in South Florida — including in Miami-Dade County and the Florida Keys — closed beaches through the weekend.

Those efforts are in stark contrast to President Donald Trump's weekend agenda, including a fireworks display Friday night at Mount Rushmore in South Dakota and Saturday's “Salute for America” celebration set to include a presidential speech on the White House South Lawn and an enormous fireworks display that could pack people into downtown Washington in the evening.

A mannequin wearing a mask is displayed with another outside a store on Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

A mannequin wearing a mask is displayed with another outside a store on Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

In Britain on Saturday, some signs of normalcy returned with pubs and barbers reopening for the first time in months.

But other countries continued to report record highs in new confirmed cases, including South Africa and India. In Australia and northeast Spain, authorities ordered lockdowns for specific counties or communities aimed at stomping out increases in cases.

Follow AP pandemic coverage at http://apnews.com/VirusOutbreak and https://apnews.com/UnderstandingtheOutbreak

A tour group riding Segways rides down Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

A tour group riding Segways rides down Miami Beach, Florida's famed Ocean Drive on South Beach, July 4, 2020. The Fourth of July holiday weekend began Saturday with some sobering numbers in the Sunshine State: Florida logged a record number of people testing positive for the coronavirus. (AP PhotoWilfredo Lee)

Parade goers are reflected in a storefront window posting a sign for customers to wear face masks before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers are reflected in a storefront window posting a sign for customers to wear face masks before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers draped in American flags walk down the street before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

Parade goers draped in American flags walk down the street before a Fourth of July parade begins Saturday, July 4, 2020, in Bristol, R.I. The town, which lays claim to the nation's oldest Independence Day celebration in the country, held a vehicle-only scaled down version of its annual parade Saturday due to the coronavirus pandemic. (AP PhotoDavid Goldman)

A man carries beer at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries beer at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries drinks at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)

A man carries drinks at the Forester pub in London, Saturday, July 4, 2020. England is embarking on perhaps its biggest lockdown easing yet as pubs and restaurants have the right to reopen for the first time in more than three months. In addition to the reopening of much of the hospitality sector, couples can tie the knot once again, while many of those who have had enough of their lockdown hair can finally get a trim. (AP PhotoFrank Augstein)