The terrorists entered from the rear side of Sunjwan Army camp where family quarters are located, DGP S P Vaid said.
At least three persons, including an Army personnel and his daughter, have been injured, officials said.
The militants, who are believed to be around three, have been isolated, they said.
IGP SD Singh Jamwal told reporters here that "around 4:55 am suspicious movement was noticed by the sentry and his bunker was fired upon. The fire was retaliated. The number of militants isn't known. They've been cornered in one of the family quarters."
Around 4:55 am suspicious movement was noticed by the santri; santri bunker was fired upon & they retaliated. No. of terrorists isn't known, they've been cornered in one of the family quarters. 2 injured, one Hawaldar & his daughter. Operation is on: Jammu IGP SD Singh Jamwal pic.twitter.com/BsPmVpuv0n— ANI (@ANI) February 10, 2018
Unconfirmed reports said one person has died in the gunfight.
Soon after the attack, reinforcements of the Armys special forces and SOG rushed to the spot and cordoned off the whole area amid a fierce gunfight, security official said.
Schools in the entire area around the camp have been closed by authorities as a precautionary measure.
A high alert has been sounded in Jammu and security beefed up in and around the city.
Intelligence inputs had warned of an attack on the Army or security establishment by Jaish-e-Mohammed in view of the death anniversary of Afzal Guru who was hanged on February 9, 2013.
The officials said that the family quarters were located at the rear side of the army camp.
Home Minister Rajnath Singh spoke to the Chief of the Jammu and Kashmir Police and took stock of the situation arising out of the terror attack on an Army camp in Jammu.