The government has lifted a strict lockdown for a week to allow millions.

DHAKA (AFP) - Tens of millions of Bangladeshis defied a Covid-19 surge on Wednesday to join prayers in packed mosques and outdoor locations, as Muslims slaughtered record numbers of animals for the festival Eid al-Adha.

The government has lifted a strict lockdown for a week to allow millions to head back to their villages for the second-largest religious festival in the Muslim-majority country.

The South Asian nation of 169 million people, where two-thirds live in villages, has been hit by a major surge in coronavirus cases and deaths in recent weeks that shows little sign of abating.

This is despite a tough lockdown in place since July 1 shutting down transport, offices and deploying the military to stop people leaving for their homes except for emergencies and essential supplies.

More than a million Bangladeshis have now been infected and over 18,000 have died -- figures seen as a gross undercount. The surge has been blamed largely on the Delta variant first detected in neighbouring India.

On Wednesday, the streets of Dhaka took on a festive look, with people in traditional clothing hugging each other and watching butchers as they slaughtered cows and goats for the three-day celebration.

Iftekhar Hossain, a spokesman for the livestock ministry, told AFP "a record 11.9 million cows, goats, buffaloes and lambs have been readied for sacrifice this Eid".

He said authorities have launched an app to facilitate online animal sales as they want to cut crowds in the cattle markets to stop the spread of coronavirus.

"A record 387,000 cows and goats have been sold online," he said.

The Eid al-Adha animal sale is a $10 billion industry and is one of the key drivers of the economy in rural Bangladesh.

It is a key reason the government lifted the lockdown to allow cattle farmers to bring their animals to the cities.

Mohammad Ali, a farmer, said: "Last year we had to struggle due to the lockdown. This year again, if the lockdown wasn’t lifted, we along with our families would have to die starving."

Ali came to Dhaka with 20 cows from the western border district of Kushtia.

On Tuesday, hundreds of thousands of people thronged the Gabtoli cattle market, the largest in the capital, deep into the night for last-minute purchases of animals.

"This is a difficult time. But sacrificing an animal during Eid is mandatory. Being a follower of Islam, how can I deny that? That’s why I came to the market to buy a cow," Yasir Arafat, 39, a banker and a buyer, told AFP.