Police say assailants have fired at Indian police officers and freed a Pakistani militant they were taking to a hospital for a medical checkup in the Indian portion of Kashmir.

Police officer Ghulam Hasan Bhatt says two police officers suffered bullet injuries in Tuesday's attack in Srinagar, the main city in India-controlled Kashmir. But the attackers escaped with the insurgent.

The rebel, belonging to the Lashkar-e-Taiba group, was arrested by police in 2015.

Several militant groups have been fighting for Kashmir's independence from India or its merger with neighboring Pakistan since 1989. Around 70,000 people have been killed in the armed uprising and the ensuing Indian military crackdown.

Anti-India sentiment runs deep among Kashmir's mostly Muslim population, with most people supporting the rebels' cause.