Indian soldiers have killed three armed militants in Kashmir in a gunbattle that lasted more than 24 hours, foiling an attack on a military base near the de facto border with Pakistan, officials said Monday.

An Indian soldier keeps watch from his position near the Line of Control (LoC) -- the heavily militarised border that divides Kashmir between India and Pakistan -- in Gingal Uri, on December 5, 2014 © AFP Rouf Bhat
An Indian soldier keeps watch from his position near the Line of Control (LoC) — the heavily militarised border that divides Kashmir between India and Pakistan — in Gingal Uri, on December 5, 2014 © AFP Rouf Bhat

Firing erupted early Sunday morning after militants crossed the heavily militarised border that divides Kashmir between India and Pakistan and only ended on Monday, an army spokesman said.

Indian troops were searching near the border town of Tangdhar, some 140 kilometres (86 miles) northwest of the main city of Srinagar, for any remaining militants, army spokesman N.N. Joshi said.

“We can confirm three militants dead in the gunbattle,” Joshi told AFP.

“One civilian, an old man, was also killed in the crossfire,” another army official, Colonel Brijesh Pandey, said.

A top police official, speaking on condition of anonymity, said the militants had tried to storm the army’s brigade headquarters before fleeing to a nearby village.

Kashmir has been divided between India and Pakistan since the two countries won independence from Britain in 1947. Both claim the Himalayan territory in its entirety.

Since 1989 several militant groups have been fighting hundreds of thousands of Indian forces deployed in the territory administered by New Delhi, for independence of the region or its merger with Pakistan.

The fighting has left tens of thousands, mostly civilians, dead.

India routinely blames Pakistan for training and arming militants and sending them across the border known as the Line of Control (LoC) to take part in the fighting.

Islamabad denies the charges saying it only provides political and diplomatic support to Kashmir’s struggle for a right to self-determination.

According to Indian officials, in separate incidents in Kashmir on Monday an Indian border guard was injured by firing from across the border at Kathua and Pakistani troops violated a 2003 ceasefire agreement by firing “small arms and RPG shells” from across the LoC near Poonch with no reported damage or casualties.