LAGOS, Nigeria — After a Nigerian attempted to blow up a U.S. jetliner and a homegrown terror group bombed and killed at will, Nigeria has passed a sweeping anti-terrorism bill.
The law in Africa's most populous nation gives its president the power to declare any group a terrorist organization and imprison convicted members for as long as 20 years.
Those who supply "moral assistance" can face 10 years, and warrantless searches are allowed.
After the Sept. 11 attacks on the United States, countries throughout Africa passed new anti-terrorism bills as threats from al Qaeda-inspired groups increased.
However, vast lands and weak law enforcement continue to hinder countries' abilities to fight back - and some leaders use loosely worded laws to harass their opponents.
There's "a worrying trend in sub-Saharan Africa in recent years, and that's the growing tendency of governments to pass sweeping anti-terrorism laws and then to use them not only in legitimate efforts to arrest and prosecute terrorism suspects, but often as a weapon against regime opponents in general," said Richard Downie, deputy director of the Africa program at the Washington-based Center for Strategic and International Studies.
In Nigeria, home to 150 million people, terrorism takes many forms. In its oil-rich southern delta, for instance, militant groups bomb oil pipelines and kidnap foreign workers.
And on Christmas Day 2009, Nigerian Umar Farouk Abdulmutallab boarded a flight out of Lagos on his way to attempt to bring down a Detroit-bound airliner, allegedly on behalf of an al Qaeda cell in Yemen.
Nigeria has seen an increase in attacks carried out by a radical Muslim sect known locally as Boko Haram, which wants strict Shariah law across the country.
U.S. officials fear the group has ties to two al Qaeda-aligned groups already operating in Africa.
The U.S. pushed Nigeria to pass its counterterrorism bill. But it grants wide-ranging powers to police officers who routinely demand bribes from motorists, make arrests to shake down citizens and often kill suspects in custody.
"We already have concerns with extrajudicial killings and unlawful conduct," said Olawale Fapohunda, a human rights lawyer based in Lagos who worries the new powers will, in effect, legalize police criminality.
Burkina Faso, Niger and South Africa all have passed anti-terrorism laws in the past decade.
South Africa adopted new anti-terrorism legislation in 2004, replacing laws dating back to the apartheid era.
Since then, 18 people have been convicted on terrorism-related charges there, including 13 South Africans, two from Lesotho and one citizen each of Mozambique, Palau and Zimbabwe, according to documents obtained by the Associated Press in response to a request under South Africa's freedom of information law.
Cross-border cooperation has led to the arrest of suspected terrorists, such as South Africa quickly nabbing and charging a suspected leader of a militant group in Nigeria last year.
Mali also is partnering with neighbors to fight against al Qaeda in the Islamic Maghreb.
But many more challenges remain. Somalia, where the al Qaeda-aligned group al-Shabaab operates, hasn't had a stable government since 1991.
The dysfunctional government in the Democratic Republic of the Congo, which covers an area the equivalent size of a quarter of the U.S., can't patrol its vast countryside.