Indian troops were still battling at least two gunmen Sunday evening at an air force base near the border with Pakistan, more than 36 hours after the compound came under attack, a top government official said.

The two suspected militants were discovered shortly after noon Sunday and hours later appeared to have been cornered, Home Secretary Rajiv Mehrishi told reporters, adding that he expected the gunmen to be "neutralized" soon.

The attack on the base started before dawn Saturday and is seen as an attempt to undo recent improvements in the relationship between rivals India and Pakistan. It comes a week after Narendra Modi became the first Indian prime minister in 12 years to visit Pakistan.

The Associated Press says at least seven soldiers and four gunmen have been killed in the fighting so far at the Pathankot air force base, while Reuters is reporting that six gunmen have been killed.

A home ministry source who did not want to be named told Reuters that one gunman was killed Sunday in an explosion at an administrative building at the base.

India Air Base Attack

Indian security men guard near the India Gate War memorial in New Delhi as part of enhanced security measures following the attack on the air force base near the country's border with Pakistan. (Tsering Topgyal/Associated Press)

"The decision to blow up the one of the administrative units was taken to neutralise the sixth militant. It was also needed to make sure we destroyed live grenades," the source told Reuters on condition of anonymity.

The source said it was not yet clear whether the air base was now fully secured but efforts were under way to complete the operation before nightfall.

Alert about attack on Friday

Mehrishi said that an alert about a terror attack in Pathankot was sounded on Friday afternoon, and that aerial surveillance at the base spotted the suspected militants as they entered the compound. He said they were quickly engaged by Indian troops and "were unable to move toward their likely intended target" of the area where the base's aircraft and military equipment are kept.

Since Saturday morning, the base has been swarming with air force commandos, troops from India's elite National Security Guard and local police.

The attack at one of India's major air force bases started a few hours before dawn Saturday when a group of militants entered the area of the base where the living quarters are located, the Defence Ministry has said. The first gun battle with the militants lasted about 14 hours, after which the air force said it had begun operations to secure the base.

Mehrishi said that troops were not certain of the presence of additional gunmen until they were discovered Sunday afternoon.

He said the two men were cornered in a wooded area of the base by the evening.

The sprawling Pathankot air force base is spread over several kilometres, including some forested sections. It houses a fleet of India's Russian-origin MiG-21 fighter jets and Mi-25 and Mi-35 attack helicopters, along with other military hardware.

The Defence Ministry said no aircraft or military equipment has been damaged in the fighting.

Fighting since 1989

The base is on the highway that connects India's insurgency-plagued Jammu and Kashmir state with the rest of the country. It's also very close to India's border with Pakistan.

The Himalayan region of Kashmir is divided between India and Pakistan, but is claimed in its entirety by both. Rebels in India's portion of Kashmir have been fighting since 1989 for independence or merger with Pakistan.

India accuses Pakistan of arming and training the insurgents, a charge Islamabad denies, and the attack at the base is being viewed as a possible attempt to unravel recent progress in the relationship between the two nations.

Police have said they're investigating whether the gunmen came from the Indian portion of Kashmir, where rebels routinely stage attacks, or from Pakistan.

The violence follows Indian Prime Minister Modi's surprise Dec. 25 visit to Pakistan, where he met with his Pakistani counterpart, Nawaz Sharif — a trip that marked a significant thaw in the mostly tense relations between the nuclear-armed neighbours.

The two leaders also held an unscheduled meeting at the Paris climate change talks last month.

Ahead of Modi's visit to Pakistan, the national security advisers of both countries had met in Thailand. The foreign secretaries of both nations are scheduled to meet in Islamabad later this month.

The responses to the weekend attack from both countries have been muted so far, with neither New Delhi nor Islamabad giving any indication that the planned talks are under any threat.

In Pakistan, Sharif's foreign affairs adviser, Sartaj Aziz, said in a radio interview Saturday, as the attack was unfolding, that Pakistan wants to consolidate its improved relations with India. Pakistan's foreign ministry condemned the attack.

The reaction in India has also been quiet so far. While all political parties condemned the attack, there was no immediate demand that the government call off talks with Pakistan. In the past, when it was in opposition, Modi's own right-wing Bharatiya Janata Party has been the most vocal critic of engagement with Pakistan, saying that talks and terror should not go together.

But with Modi's own diplomatic engagement with Islamabad at stake, the BJP has given no indication yet that the planned talks have been threatened by the attack.

with files from Reuters