Thousands of people poured onto beaches in Orange County over the weekend as Southern California experienced its first major heat wave of the year, even as officials continue to urge visitors to avoid mass gatherings and practice social distancing due to the coronavirus outbreak.

Photos and videos showed Huntington Beach and Newport Beach lined with crowds on Saturday. More than 40,000 people were estimated to have visited Newport Beach on Friday, The Associated Press reported.

The swarm of visitors came as beaches remained closed under stay-at-home orders in Los Angeles and San Diego counties. Beaches operated by the state have also remained closed, according to the AP.

Orange County reopened its beaches with modified restrictions for nearby areas. Parking lots and piers were reportedly closed to prevent an influx of out-of-town visitors. Ventura County, about 70 miles north of Los Angeles, also reopened its beaches while keeping parking lots closed.

The county also barred visitors from lounging or sunbathing, mandating that beachgoers "keep moving [while] walking, running, surfing and swimming."

Brian O'Rourke, a lifeguard battalion chief in Newport Beach, told NBC News on Saturday that lifeguards had not experienced many problems as they attempted to maintain social distancing requirements, though he noted that they were most focused on monitoring those in the water