Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

A police officer in India underwent more than seven hours of surgery after his hand was hacked off during an attack Sunday while he was trying to enforce the country's coronavirus lockdown.

The Government of the State of Punjab said on Twitter the "horrendous attack" happened at a vegetable market in Patiala, located about 170 miles north of New Delhi.

Assistant Sub-Inspector Harjeet Singh was taking part in a COVID-19 enforcement operation when he tried to stop a group of five men at the market and was attacked with a sword that severed his wrist.

INDIA POLICE TELL FOREIGN VISITORS WHO VIOLATED CORONAVIRUS LOCKDOWN ORDERS TO WRITE APOLOGY NOTES, REPORT SAYS

The officer was then rushed to a hospital in Chandigarh for an operation that lasted seven and a half hours.

Authorities respond after an officer had his hand hacked off during an attack Sunday while he was trying to enforce the coronavirus lockdown.  (Government of the State of Punjab)

Punjab's chief minister, Capt. Amarinder Singh, tweeted that the surgery was a success and the hand was reattached.

"I thank the entire team of doctors and support staff for their painstaking effort," he tweeted. "Wishing ASI Harjeet Singh a speedy recovery."

The attack was captured on video and obtained by India Today.

WARNING: GRAPHIC CONTENT

It triggered a pursuit and standoff by police after the suspects fled to a Sikh temple about 6 miles from the market.

A standoff at the temple lasted for about six hours as officers tried to negotiate with the men, who then opened fire on authorities. One of the attackers was injured in the exchange of gunfire, Sky News reported.

Authorities respond after an officer had his hand hacked off during an attack Sunday while he was trying to enforce the coronavirus lockdown. The attackers then hid in a Sikh temple, causing standoff that lasted several hours.  (Government of the State of Punjab)

The Punjab state government said that 11 men eventually were taken into custody. Officers also seized guns, ammunition, petrol bombs and a large amount of cash.

The group of men belonged to the Nihang Sikh religious sect, a group that carries traditional arms and wears blue robes, according to Sky News.

CLICK HERE FOR FULL CORONAVIRUS COVERAGE

The attack happened two days before Indian Prime Minister Narendra Modi announced an extension to the country’s lockdown for 1.3 billion people until May 3. He said in a national address there may be some easing of restrictions after one week to help poor daily wage earners and those working in the agriculture sector.

A Kashmiri man wearing protective gear crosses a barricade in an area declared as red zone by the government during lockdown in Srinagar, Indian controlled Kashmir, Tuesday, April 14, 2020. (AP Photo/Mukhtar Khan)

Modi, who said India has paid a big economic price by imposing the lockdown, added that restrictions will be eased only in areas that do not show any deterioration in the spread of coronavirus.

Policemen stop a woman from entering a containment zone during lockdown in Hyderabad, India, April 14. (AP Photo/Mahesh Kumar A.)

India has sealed hundreds of residential districts as containment zones across the country, ramping up a low rate of testing. Modi said efforts are underway to ensure no new hot spots emerge in the country.

CLICK HERE FOR THE FOX NEWS APP 

As of Tuesday, there are 10,541 cases of COVID-19 in India, with at least 538 deaths, according to Johns Hopkins University.

The Associated Press contributed to this report.