Seeking to contain Covid-19, the mayor of Rio de Janeiro announced Monday the iconic Brazilian beach city will require sunbathers to social distance and reserve space on the sand in advance via an app.

Mayor Marcelo Crivella said Rio’s world-famous beaches could only fully reopen with clearly demarcated areas to keep people apart.

But implementing the measure could prove difficult in a city where the sand has already been packed in recent weeks despite the threat of a 107-real ($20) fine.

“People will be able to remain in demarcated areas, based on the time they arrive and also by reserving via an app,” Crivella told a news conference.

“That way, we can better organise something that’s not working well today.”

Rio authorities closed beaches in March to fight the spread of the new coronavirus, which has killed more than 100,000 people in Brazil, the second-highest death toll in the pandemic, after the United States.

Rio Governor Wilson Witzel admitted at the time the measure amounted to “heresy” in a place known for its love of the beach.

With more than 14,000 deaths, Rio state has been hit harder by the virus than any other in Brazil except for Sao Paulo.

On July 31, Crivella reopened the Rio ocean front for swimming, but sitting on the sand is still off-limits.

Despite that, throngs of people have crowded legendary beaches such as Copacabana and Ipanema on recent weekends, soaking up the sun, playing football in the sand and gazing at the green mountains dotting the turquoise water.

Crivella did not set a date for the reopening, saying officials would give more details soon.

In July, the mayor had said he would only allow people back on the beach when there was a coronavirus vaccine.

Other beach destinations have also experimented with technology to reopen.

Spain is using drones, Belgium is using sensors and cell-phone location trackers, and various places are asking beach-goers to reserve via websites or booking apps.

Rio also authorized business conferences and corporate events again, effective immediately.

On July 29, Brazil reopened to foreign visitors arriving by plane after a four-month suspension, hoping to revive its lockdown-devastated tourism industry despite its struggles to contain the virus.