Indian forces have killed the last of the six militants who attacked an air force base near the Pakistan border over the weekend, the defence minister said Tuesday, though soldiers were still searching the base as a precaution.

Manohar Parrikar stopped short of saying the operation was finished, but Indian officials have said repeatedly that only six gunmen were involved.

Parrikar did not explain how just a handful of gunmen managed to paralyze a large Indian airbase for almost four days, insisting that security forces had done "a commendable job." Seven Indian soldiers were killed during the attack.

"I see some gaps (in intelligence) but we will be able to understand only after the investigation. But I don't think we compromised on security," he told reporters after touring the scene of the fighting. He noted that the base is large, and wooded in some places, making it difficult to pin down the gunmen.

Indian officials had been warned beforehand that an attack could be imminent at the Pathankot base, and had flown commandos there in case of trouble. The warning came after the gunmen kidnapped an off-duty policeman near the base the day before the attack began, apparently to steal his vehicle. The policeman was freed the next day, and warned security forces that a team of heavily armed militants was in the region.

INDIA-ATTACK/

An army ambulance enters the Indian air force base at Pathankot in Punjab on Monday, Jan. 4, 2016. (Mukesh Gupta/Reuters)

Parrikar said the militants' weapons included AK-47 assault rifles with makeshift rocket launchers attached, mortar rounds that could be fired from the launchers, pistols, and 50-60 kilograms of ammunition.

In the first known claim of responsibility, the United Jehad Council, an alliance of 13 Kashmir-based rebel groups, claimed that its "highway squad," which normally attacks military convoys, carried out the attack.

Alliance spokesman Syed Sadaqat Hussain said in a statement to Current News Service, which is based in the Indian portion of Kashmir, that the attack was a message to India that its security forces were not beyond the militants' reach.

The council is based in Pakistan's portion of Kashmir, the Himalayan region divided between the countries but claimed in its entirety by both.

Sharad Kumar, chief of India's National Investigation Agency, has said that telephone intercepts suggested the attackers were from Pakistan. He gave no details on those intercepts in an interview Tuesday with the television news channel TimesNow.

Pathankot base

Indian army personnel stand on alert near the air force base in Pathankot. An umbrella group of Pakistani proxy jihadist outfits, fighting in Indian-controlled Kashmir, claimed responsibility for the attack. (Narinder Nanu/AFP/Getty Images)

Indian Prime Minister Narendra Modi spoke to his Pakistani counterpart, Nawaz Sharif, on Tuesday, Modi's office said in a statement, noting the Indian prime minister emphasized the need for Pakistan to act against those responsible for the attack.

The attack followed Modi's surprise recent visit to Pakistan and came days before top foreign ministry officials were to meet in Islamabad to discuss a range of outstanding issues, including Kashmir.

India accuses Pakistan of arming and training insurgents in its portion of Kashmir. Pakistan denies that and says it only provides moral and diplomatic support.

With files from Reuters