The town is located about 300km southwest of Lucknow, the capital of Uttar Pradesh state.
The assailants fought with police as they tried to enter a Central Reserve Paramilitary Force site, Sanjiv Gupta, a police official, told the Press Trust of India agency.
 
The men approached the gate of the police camp at about 4am local time and opened fire, killing two officers.
The attackers then lobbed a grenade over the gate, killing five other officers, Brij Lal, another Uttar Pradesh police officer, said.
 
Ensuing crossfire
 
A rickshaw puller outside the gate was killed in the ensuing crossfire, Lal said.
 
It was unclear if the suspects were killed, he said.
 
The dead officers belonged to a special police force created to combat fighters, Lal said.
 
Police said they were hunting for the attackers, who were armed with assault rifles and grenades, and believed that two of them were wounded.
 
Police have cordoned off the attack site and are investigating the attack, Lal said.
 
Prime suspects
 
The NDTV news channel quoted home ministry sources as saying they suspected Lashkar-e-Tayabba, an armed Muslim group, was behind the attack.
 
India blames Lashkar-e-Tayabba for an attack on its parliament in December 2001 and on a Hindu temple in western Gujarat state in 2002.
 
In November, a series of bombs ripped through courthouse complexes in three north Indian cities, including Lucknow.
 
The blasts killed at least 16 lawyers and wounded nearly 60 others.