Sri Lanka’s president has pardoned a soldier who was sentenced to death for killing eight civilians during the country’s civil war, leading to accusations that the government was taking advantage of the chaos from the coronavirus pandemic to free a wartime ally accused of atrocities.

The pardon reverses one of the very few convictions from the 26-year civil war, during which dozens of militants and military officers were accused of war crimes. The pardoned soldier, former Staff Sgt. Sunil Ratnayake, was sentenced in 2015 for blindfolding eight civilians from the Tamil ethnic group, slitting their throats and dumping their bodies into a sewer in 2000. Three of the victims were children.

The pardon brought outrage from rights activists and opposition politicians, but little obvious reaction from the broader Sri Lankan public, which is under a strict curfew in order to contain the spread of the coronavirus.

President Gotabaya Rajapaksa instructed the Ministry of Justice to release Mr. Ratnayake from prison on Thursday. Mr. Rajapaksa, who was elected in November, is himself accused of having ordered war crimes during the civil war, when he served as defense secretary.