PATHANKOT: An operation to secure a militant-hit Indian air base near the Pakistan border ended on Saturday with six Indian security men and four suspected gunmen killed, police said, after an assault that threatens to undermine the two countries' fragile peace process.

At least four gunmen alleged to be from Jaish-i-Mohammed group dressed in army uniforms infiltrated the Pathankot air base in northern Punjab state at around 3:30 am.

The attack was a rare targeting of an Indian military installation outside disputed Kashmir.

Special commandos secured the Pathankot air force base 14 hours after it was infiltrated by gunmen wearing Indian army uniforms, officials said.

“We have recovered four dead bodies and are searching for more. Our men are sanitising the area,” H. S. Dhillon, a senior police chief for the Punjab region told AFP.

An army official confirmed the operation had ended and forces were checking the area for residual explosives.

Pathankot in India's Punjab province is close to the border with Pakistan.—Google maps

Home Minister Rajnath Singh tweeted his congratulations to the army on “successfully neutralising” the terrorists.

“We want peace but if terrorists carry out attacks on Indian soil we will give them a befitting reply,” he said earlier in the day.

Kunwar Vijay Partap Singh, director general of police in Pathankot district, told AFP that the attack began around 3.30am and that there were four to five attackers.

He said the operation to eliminate the gunmen had lasted three hours. The airbase was being combed to determine the fate of the remaining attackers.

Singh added that there had been no damage to fighter planes at the base and that security forces were still trying to identify the attackers.

Indian army soldiers take positions on a rooftop of a building outside the Indian airbase in Pathankot. —AP

One Indian home ministry official said Punjab and Jammu states were on high alert and all defence bases had been sealed.

“Attacking an air base is a serious security threat. The new strategy of the terrorists is to identify defence bases near the border and launch attacks,” said the official, who was not authorised to comment on the record.

The Pathankot air base houses dozens of fighter jets and is important for its strategic location about 50 kilometres from the Pakistan border.

Indian security forces stand outside an Indian air force base in Pathankot, north of New Delhi, India, Saturday, Jan 2, 2016.—AP

Pakistan condemns attack

Pakistan has condemned the attack in Pathankot, India, and said it remains committed to partner with India as well as other countries in the region to completely eradicate the menace of terrorism afflicting the region.

"Pakistan extends heartfelt condolences to the government and people of India and the bereaved families and wishes the wounded speedy and full recovery," FO spokesman Qazi Khalilullah said.

High alert

Authorities had put the state on high alert on Friday after five gunmen in army fatigues hijacked a car driven by a senior police officer, which was later found abandoned on the Pathankot-Jammu highway.

It was not yet clear if there was any link with Saturday's attack.

In July, three gunmen dressed in army uniforms opened fire on a bus and then attacked a police station in the nearby Gurdaspur district of Punjab, killing seven people including four policemen.

While insurgents frequently target police in the volatile Kashmir region, Punjab, a majority-Sikh state, has largely been spared the violence.