Two policemen were killed late Tuesday when gunmen attacked a police station on the northern edge of the Niger capital Niamey, a security official said.
It is the closest attack to the city yet in a long-running insurgency by suspected jihadists.
“The toll is two dead and four wounded, two of them serious,” the security source said Wednesday.
“We heard gunfire coming from the station at 11:00 pm (22:00 GMT),” a witness told reporters, speaking on condition of anonymity.
The police station is at the northern entrance to the city, on the highway from Ouallam, about 100 kilometres (60 miles) away.
Police investigators were on the scene on Wednesday morning, a reporter saw.
Niger, a large state in the heart of the Sahel region, is grappling with attacks by jihadist groups in the west of the country, and raids by Boko Haram Islamists in the south, near the border with Nigeria.
Eighty-eight civilians were killed by Boko Haram in March alone, and more than 18,000 villagers forced to flee their homes, according to the United Nations.
On June 8, a US military vehicle was hit by an improvised explosive device as it entered a firing range near Ouallam for a joint training exercise.
Niger hosts an estimated 800 US troops, the largest American deployment in Africa.
The scale of the US presence came to light in October 2018, when four US and five Nigerien troops were killed in an ambush by fighters affiliated to the so-called Islamic State group.
Security is tight in Niamey, with high-profile deployment of the military and police checkpoints on the highways into town.
The city is due to host a summit of the African Union (AU) on July 7 and 8.