RELATED: Gov. Newsom warns of 'record breaking temperatures' amid California heat wave
"Really, don't be gathering outside of your family. If at all you can help it, recreate more towards your home," Martin said.
She said just last weekend, traffic was backed up for an hour trying to come to the beach.
"I've seen volleyball games, I've seen what would be called college-type drinking games and it's really not supposed to be happening right now," the mayor said. "Really supposed to be doubling down, everybody is going back to school, kids and college students are also going back. It's actually about what level of risk are you willing to put other people at?," she wondered.
RELATED: Record-breaking heat wave continues to scorch Bay Area with triple-digit temps
The city closed the beach for the Fourth of July weekend and are considering doing the same for Labor Day weekend.
"It worked really well. Everybody was able to stay away. We were able to get the message out far enough in advance that people who would normally come from Sacramento or Manteca to come, and recreate here were able to save themselves a trip. For Labor Day we're considering it, we're talking to our neighbors on the coast and figuring out what's the best path forward here to keep our community safe," Martin said.
Both beachgoers and surfers we spoke with said they understand the decision.
Owen Odell lives in San Francisco and came to the beach to surf Friday morning. "If cases are spiking then yeah, shut down the beaches. It drives people away, I guess," Odell said.
VIDEO: Heat stroke vs heat exhaustion: What's the difference and what are the symptoms?
John Smith, another resident of San Francisco, said if the city decides to close the beach, it's a small price to pay.
"Although we all want to stay cool, if they close the beach down, we need to respect that. Wear a mask, social distance," Smith said.
Martin said she just wants to make sure people recreate safely. And if they can, close to home.
"It's a double edged sword. You don't want to deter people from coming here and spending their money here, and we want people to come recreate. But, right now, it's a difficult time for all of us," Martin said.
Watch the latest AccuWeather forecast and take a look at recent weather stories and videos.