ISLAMABAD, Pakistan — On top of a raging insurgency and devastating seasonal floods, Pakistan is reeling from a particularly acute outbreak of dengue fever that has left local authorities scrambling to contain the epidemic.

Dengue, a tropical disease primarily transmitted by mosquitoes, has already infected thousands across the country and killed as many as two dozen people, including a local politician. The influx of patients is also straining the health care system with some hospitals having to accommodate three patients per bed.

The disease makes regular appearances at this time of year after monsoon rains have provided plenty of breeding sites for mosquitoes. But this year’s outbreak is particularly virulent, especially in Lahore, the country’s second-largest city and capital of Punjab Province, where most of the cases have been reported.

The local government has reacted frantically to the daily increase of cases with a series of measures including school closures, free treatment for dengue patients and large fumigation drives. But some say the response is inadequate and authorities should have focused more efforts on prevention.

“The chaos we see in the Punjab could have been avoided by taking timely measures,” wrote the Express Tribune in a recent editorial. “Things have been left too late and the result is mass pandemonium and the confusion that comes with it for millions of people.”

Qutbuddin Kakar, a dengue specialist for the World Health Organization in Pakistan, said the disease typically follows a two-year cycle where large outbreaks are followed by smaller ones as people develop immunity. As immunity fades, people are more vulnerable to dengue the following year, he said.

Kakar said the current outbreak can be contained relatively quickly with the proper insecticides.

“We should be optimistic,” he said.

Using the appropriate pesticide is indeed crucial, said Hussnain Sayyed, a professor at the Institute of Biotechnology at the Bahauddin Zakarya University in Multan. Sayyed said only alternative insecticides or a mix of pesticides and specific chemicals are effective as mosquitoes have developed resistance to the insecticides currently in use.

“The major reason [for the dengue outbreak] — in my view — is the resistance,” he said.

Dengue first appeared in Pakistan in 1994, but the outbreaks have been especially pronounced recently. Infected people develop fever, muscle pain and skin rashes, and in some cases the disease can prove fatal.

Schools are closed for 10 days in Lahore, while fountains were switched off in Islamabad and swimming pools were shut down in Karachi. Medicine, insecticide and screening equipment has been imported, and a team of experts arrived from Sri Lanka, which has long experience with the disease.

For now the number of cases continues to rise with official figures at more than 4,000 and some local media claiming much higher numbers. Experts say cold weather will eventually quash the outbreak, but this could be more than two months away.

Brulliard is a Washington Post special correspondent.