Suicide bombers have struck a military camp and a French-run uranium mine in two towns in north-west Niger.
A bomb at a barracks in Agadez killed 19, including 18 soldiers. Four attackers died. A fifth held out but officials said he too was overpowered.
The attack on the Somair mine, in the town of Arlit, killed one person and injured 14, its operator Areva said.
Reports say militant leader Mokhtar Belmokhtar was behind the attacks, but these cannot be verified.
The Mauritanian news agency Alakhbar quoted a spokesman for his group as saying: "It was Belmokhtar who himself supervised the operational plans of attacks."
The claims also appeared on a jihadist forum, AP news agency reported.
Earlier, the jihadist Mujao group had said it had carried out the two attacks.
Mujao spokesman Abu Walid Sahraoui said the operations targeted "the enemies of Islam in Niger", according to AFP.
"We attacked France, and Niger because of its co-operation with France, in the war against Sharia," he added, thought to be a reference to French and Nigerien involvement in combating Islamists in neighbouring Mali.
French President Francois Hollande vowed to protect his nation's interests and co-operate with Niger in its "fight against terrorism".
Both attacks were carried out as people prepared for early morning prayers just after 05:00 local time (04:00 GMT), BBC West Africa correspondent Thomas Fessy reports.
He says the army is patrolling in and around Agadez following the attack.
Niger's Defence Minister Mahamadou Karidjo said insurgents had driven a car bomb into the military base there. Around two dozen people were wounded in the blast, including civilians.
He said the government had declared three days of mourning.
Earlier reports said one Islamist fighter had held out inside the barracks and was believed to be holding several military cadets hostage.
However, a senior military official told Reuters that the fighter was finally "neutralised" and hadn't had any hostages.
Mr Karidjo also denied that any hostages had been taken.
It was not clear if the fifth militant had been captured alive.
Further north in Arlit, a suicide bomber blew up a car close to workers at the mine operated by French nuclear company Areva.
It said one person had been killed and 14 were being treated in hospital.
Niger's Interior Minister Abdou Labo put the number of wounded at the site at about 50.
Areva said operations at the mine had been "temporarily suspended" and a team will visit the site to assess the damage.
Mokhtar Belmokhtar was believed to be behind the deadly attack on an internationally-run Algerian gas plant in January in which 37 hostages and 29 insurgents were killed.
He broke away from al-Qaeda in the Islamic Maghreb (AQIM) last year and formed a new jihadist group, known variously as the Signed-in-Blood Battalion, the Masked Men Brigade and the Khaled Abu al-Abbas Brigade.
Armed forces in Chad said he died in a raid in northern Mali on 2 March, although there was no confirmation and his death has been declared many times before.
Security was stepped up at Areva's Arlit operation - one of the country's biggest uranium mines - in February. Niger provides one-fifth of France's uranium needs, according to French media.
Niger's President Mahamadou Issoufou said French special forces had moved in to protect the site after January's attack in Algeria.
Seven workers, including five French nationals, were kidnapped from the Arlit mine by Islamist militants in 2010.
Four of them are still being held and it is believed they could be in northern Mali, close to where French troops were sent to oust al-Qaeda-linked militants in January.
Mujao (the Movement for Unity and Jihad in West Africa) is a splinter group of AQIM which operates mostly in northern Mali.
It says its objective is to spread jihad to West Africa rather than confine itself to the Sahel and Maghreb regions - the main focus of AQIM.