SRINAGAR (Reuters) - A three-day gunbattle in the disputed region of Kashmir ended on Monday when Indian security forces killed two more militants who stormed a government building, a senior police official said.

(See pictures from the operation here)

The militants captured the five-storey training institute on Saturday, killing six people in the gunbattle that followed.

“The encounter is over. All three militants have been killed,” Deputy Inspector General of Police Ghulam Hassan Bhat said. One militant was killed on Sunday.

Muslim separatists have been fighting Indian forces in the Indian portion of Kashmir since 1989. India accuses Pakistan of training and arming the rebels in the portion it controls and sending them to the Indian side, a claim its neighbour denies.

“This is one of the longest encounters in Kashmir in recent memory,” said an army officer, who asked not to be named. “This is because the building is very big and we have suffered casualties.”

The attack began on Saturday when militants shot at a bus carrying police before breaking into the training institute. More than 100 people were inside at the time.

Three Indian army commandos, two policemen and a civilian died in the fighting.The latest attack bore similarities to other militant attacks in India where heavily armed, well-trained men have captured buildings and used them to fight security forces.

A similar recent attack on the Pathankot air base that lasted for four days stalled efforts to revive bilateral talks between nuclear-armed rivals India and Pakistan.India and Pakistan fought two of their three wars since independence in 1947 over Muslim-majority Kashmir, which they both claim in full but rule in part. The third was fought over the founding of Bangladesh.