"One terrorist has been killed and one soldier has been martyred in this operation," he said, adding that a weapon was recovered from the slain terrorist.
Earlier reports quoting police sources said two soldiers were killed in the gunfight.
The injured soldiers were taken to the Army's 92 Base Hospital in Badamibagh cantonment area of Srinagar.
The slain militant, identified as Hilal Ahmad Rather, was a local Kashmiri working for the Hizbul Mujahideen outfit.
Police sources said Hilal Ahmed Rather joined the Hizbul as an active militant after he was spotted in a CCTV footage helping the escape of Naveed Jatt, a Pakistan militant of LeT, from Srinagar's S.M.H.S. hospital on February 6, 2018.
Naveed Jatt, believed to be responsible for the murder of senior Kashmiri journalist Shujaat Bukhari, was killed by security forces in Badgam district on November 8.
The fighting in Ratnipora village began on Tuesday when a group of militants fired at the security forces.
"In the initial firing exchanges, three soldiers were injured. They were immediately shifted to Army hospital," the officer said.
As news about the fighting spread, youths in the area clashed with the security forces in a bid to disrupt the operation.
Mobile Internet services in the district were suspended. Rail services between Bannihal town of Jammu region and the Kashmir Valley were also suspended for the day.