With air and sea borders closed for months and eight cities barring people from entering or leaving, Morocco has been pulling out the stops to stanch the spread of coronavirus.

Still, the kingdom on the Atlantic coast, a magnet for tourists in better times, has registered more than 110,000 positive cases since March and has a death toll of 2,041 — the highest among its North African neighbors.

More Images
A man wearing a face mask to prevent the spread of coronavirus walks outside a fort that was converted into a photography museum overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

With air and sea borders closed for months and eight cities barring people from entering or leaving, Morocco has been pulling out the stops to stanch the spread of coronavirus.

A family wears face mask to prevent the spread of coronavirus while enjoying their evening by the cornice, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

Marrakech, a major tourist destination, is at a standstill, while police checks are part of the scenery in hard-hit Casablanca, the country’s economic powerhouse. Police are out in the markets, streets, drug-dealers’ haunts and closed-off beaches, with military vehicles occasionally rolling by. They are a no-nonsense signal for citizens to respect the country's strict orders to contain the virus.

A woman poses for a photo while resting on a bench in the Kasbah of Oudayas, a 12th century fortress overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

In Rabat, the political capital and site of the main palace of King Mohamed VI, police are posted at entrances and exits — although the city is not closed. Still, occupants of vehicles venturing into town are asked to show proof of residency, or provide authorization if traveling in from elsewhere, especially closed-off cities, or risk fines.

A man walks along a fence before jumping for an evening swim in the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

Morocco’s testing program is increasingly overwhelmed. Long lines for testing are now common outside hospitals and laboratories in Moroccan cities.

A man wearing a face mask to prevent the spread of coronavirus looks out into the Atlantic Ocean before sunset, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

The rise in cases has come as a blow to Morocco, which had been phasing out lockdown measures. On July 19, it began a third phase of gradually lifting its lockdown and foreign business visitors were allowed to enter the kingdom starting Sept. 10.

In this image made from UNTV video, Saad-Eddine El Othmani, prime minister of Morocco, speaks in a pre-recorded message which was played during the 75th session of the United Nations General Assembly, Saturday, Sept. 26, 2020, at U.N. headquarters. (UNTV via AP)

Abdeljalil Bounhar in Casablanca contributed to this report.

Morocco first decreed lockdown measures on March 20, but has been gradually easing restrictions. A recent upsurge in infections, however, has forced targeted measures.

A man wearing a face mask to prevent the spread of coronavirus walks outside a fort that was converted into a photography museum overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

A man wearing a face mask to prevent the spread of coronavirus walks outside a fort that was converted into a photography museum overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

Marrakech, a major tourist destination, is at a standstill, while police checks are part of the scenery in hard-hit Casablanca, the country’s economic powerhouse. Police are out in the markets, streets, drug-dealers’ haunts and closed-off beaches, with military vehicles occasionally rolling by. They are a no-nonsense signal for citizens to respect the country's strict orders to contain the virus.

In the northern city of Tangiers, military vehicles were deployed last month to help enforce measures there. Movement between the city and others was stopped, as it was in Casablanca, barring exceptional authorizations.

In Casablanca, tough measures to keep people from leaving town are in place. Police at blockades focus on taxis, buses, freight trucks and private ambulances, vehicles known to be used by those trying to sneak out of town, said Karim El Idrani, commander of the Al Fida police district.

A family wears face mask to prevent the spread of coronavirus while enjoying their evening by the cornice, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

A family wears face mask to prevent the spread of coronavirus while enjoying their evening by the cornice, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

In Rabat, the political capital and site of the main palace of King Mohamed VI, police are posted at entrances and exits — although the city is not closed. Still, occupants of vehicles venturing into town are asked to show proof of residency, or provide authorization if traveling in from elsewhere, especially closed-off cities, or risk fines.

The director of epidemiology at the Health Ministry, Mohamed Lyoubi, conceded during a webinar that he expects the situation to worsen over winter as the flu season overlaps with the COVID-19 pandemic.

“Many hospitals and test sites for the coronavirus are expected to reach capacity,” Lyoubi said. “The situation will also affect the ability of health authorities to carry out case investigations and ensure contact follow-up and monitoring of patients treated at home.”

A woman poses for a photo while resting on a bench in the Kasbah of Oudayas, a 12th century fortress overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

A woman poses for a photo while resting on a bench in the Kasbah of Oudayas, a 12th century fortress overlooking the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

Morocco’s testing program is increasingly overwhelmed. Long lines for testing are now common outside hospitals and laboratories in Moroccan cities.

With a rise in cases, hospitals have been struggling to keep up with the growing influx of patients, and some intensive care units are reaching full capacity. Last month, health workers staged a protest outside Ibn Zohr Hospital in Marrakech to demand better working conditions. Photos showing COVID-19 patients lining the corridors of the overcrowded hospital, with some lying on the floor, caused an uproar on social media.

Medical professionals held similar protests elsewhere, claiming that some health facilities are understaffed and lack protective equipment for workers. The Health Ministry has sought to remedy the situation by setting up field hospitals.

A man walks along a fence before jumping for an evening swim in the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

A man walks along a fence before jumping for an evening swim in the Atlantic Ocean, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

The rise in cases has come as a blow to Morocco, which had been phasing out lockdown measures. On July 19, it began a third phase of gradually lifting its lockdown and foreign business visitors were allowed to enter the kingdom starting Sept. 10.

But Casablanca doubled down after its infection rate began climbing. The city hosts 42% of the daily reported cases, 40% of the serious cases and 38% of the deaths recorded at the national level, according to Health Minister Khalid Ait Taleb. To counter the surge, schools were forced to close again, with the adoption of remote education. Markets, cafes, shops and restaurants were ordered to close early. The city enacted a curfew between the hours of 10 p.m. and 5 a.m. Police set up roadblocks and patrols to enforce compliance.

The Moroccan monarch said last month that “if figures continue to increase, the COVID-19 Scientific Committee may recommend another (full) lockdown, perhaps with even tighter restrictions.”

A man wearing a face mask to prevent the spread of coronavirus looks out into the Atlantic Ocean before sunset, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

A man wearing a face mask to prevent the spread of coronavirus looks out into the Atlantic Ocean before sunset, in Rabat, Morocco, Tuesday, Sept. 22, 2020. (AP PhotoMosa'ab Elshamy)

Abdeljalil Bounhar in Casablanca contributed to this report.

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

In this image made from UNTV video, Saad-Eddine El Othmani, prime minister of Morocco, speaks in a pre-recorded message which was played during the 75th session of the United Nations General Assembly, Saturday, Sept. 26, 2020, at U.N. headquarters. (UNTV via AP)

In this image made from UNTV video, Saad-Eddine El Othmani, prime minister of Morocco, speaks in a pre-recorded message which was played during the 75th session of the United Nations General Assembly, Saturday, Sept. 26, 2020, at U.N. headquarters. (UNTV via AP)