Nigeria has officially banned two militant Islamist groups, warning that anyone who helps them will face a minimum jail sentence of 20 years.
President Goodluck Jonathan declared Boko Haram and Ansaru to be terrorist groups, his office said.
The army has been waging an offensive against the militants in their northern strongholds since a state of emergency was declared last month.
The insurgency has killed about 2,000 people since 2009.
The activities of both Boko Haram and Ansaru would now fall under the Terrorism Prevention Act, Mr Jonathan's office said, in a statement.
It means that “any person who knowingly, in any manner, directly or indirectly”, offers support to Boko Haram and Ansaru would be jailed for “not less than 20 years” if convicted, the statement added.
On Monday, the US said it was offering rewards for information on Islamist militants in West and North Africa.
The highest reward of up to $7m (£4.6m) is for information leading to the location of Boko Haram leader Abubakar Shekau, the state department said.
Boko Haram launched the insurgency in 2009, carrying out a wave of bombings and assassinations in north and central Nigeria.
Ansaru, which is suspected to be an off-shoot of Boko Haram, joined the insurgency in 2012, taking foreigners hostage.
It said it had killed seven European and Middle Eastern nationals abducted in February 2012 in the northern Bauchi state.
Last month, Mr Jonathan declared a state of emergency in Borno, Yobe and Adamawa states, the three main strongholds of the Islamist groups.
It led to the army launching a ground and air assault to flush out the militants.
Rights groups repeatedly accuse government troops of targeting innocent people after falsely accusing them of backing the militants.
The army denies the allegation.