A Sri Lankan health worker sprays disinfectants as people wait to give swab samples to test for COVID-19 near a mobile testing vehicle outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

Authorities in Sri Lanka on Wednesday widened a curfew and warned of legal action against those evading treatment for COVID-19 after reporting a growing cluster centered around a garment factory in the capital's suburbs.

The number of confirmed cases has risen to 1,022, while more than 1,500 people have been asked to quarantine at their homes, health authorities said.

The Indian Ocean island nation had just reported its first community infection in two months on Sunday. All of the infected people are co-workers of the first patient, who is from densely populated Western province, which includes the capital, Colombo.

Hundreds of people—both factory workers and residents—waited in lines Tuesday at makeshift medical centers to be tested for the coronavirus in the small town of Minuwangoda, about 50 kilometers (30 miles) north of Colombo, where the factory is located.

Some who had tested positive were refusing to go to state-run treatment centers even after the government provided them with transport, Health Minister Pavithra Wanniarachchi said.

Wanniarachchi warned in a statement that legal action will be taken under quarantine regulations against those who evade treatment. Violators of the law could face a fine and imprisonment of up to three months.

Sri Lankans wait to give swab samples to test for COVID-19 near a mobile testing vehicle outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

Separately, the health ministry ordered a halt to public gatherings such as exhibitions, parties, conferences, indoor and outdoor events, carnivals, musical shows and processions.

Police also widened the curfew in suburbs of Colombo where many of the patients live. Previously, the government had closed schools, universities and imposed restrictions on public transport.

Chief epidemiologist Dr. Sudath Samaraweera said the new cluster poses a greater risk of spreading the virus in society compared to Sri Lanka's previous clusters.

The government had long touted that it had prevented community spread of the virus because all previously known cases were connected to 31 clusters and only two remained active.

The new cluster at the garment factory is the biggest reported in Sri Lanka. The previous biggest cluster was centered at a navy base and had 950 patients.

  • A Sri Lankan man rides a bicycle amid curfew as others wait to give swab samples to test for COVID-19 outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

  • Sri Lankans health workers prepare to take swab samples of people to test for COVID-19 near a mobile testing vehicle outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

  • A Sri Lankan health worker sprays disinfectants as people wait to give swab samples to test for COVID-19 near a mobile testing vehicle outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

  • Sri Lankan health workers prepare to collect swab samples from people to test for COVID-19 outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

  • Sri Lankans wait to give swab samples to test for COVID-19 outside a hospital in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

  • Sri Lankans wait to give swab samples to test for COVID-19 outside a hospital as a health official walks past in Minuwangoda, Sri Lanka, Tuesday, Oct. 6, 2020. (AP Photo/Eranga Jayawardena)

Samaraweera said the risk is high with the new cluster because employees at the factory worked close together and also went home every day and mingled with others in society. "Therefore, if people do not support us, we will find it difficult to control this," Samaraweera said.

Local media reported that police and health workers were visiting the homes of factory workers on leave and were testing them as well.

The country has reported 3,733 cases, including 13 deaths. Of the total patients, 3,266 have recovered.