DAKAR, Senegal — For years, he waged a ferocious and bombastic campaign against the Nigerian government from his exile hideout.
However, Nigeria’s most wanted fugitive appeared in court in the capital, Abuja, on Tuesday afternoon, hooded, flanked by security agents, and facing treason charges.
Nnamdi Kanu, the leader of the Indigenous People of Biafra, a secessionist group in Nigeria’s southeast, had not been seen in the country since he was released on bail in April 2017 and then vanished.
Mr. Kanu, on the other hand, loomed large in his absence.
He drew many more supporters to his cause of restoring Biafra’s independence, and his popularity and profile have only grown — partly as a result of the Nigerian government viewing him as a serious threat, analysts say.
It has been 50 years since Nigeria’s civil war, during which Biafra fought for independence from the newly independent Nigeria. One million people may have died, many of them as a result of starvation. Biafra eventually surrendered, but in recent years, many residents of the southeast have renewed their support for the cause.
Mr. Kanu has exploited the perception that the federal government is biassed against the people of the southeast, many of whom are members of Nigeria’s third-largest ethnic group, the Igbo.
Prone to inflammatory rhetoric, he has referred to Nigeria as a “zoo” and frequently repeats the false claim that Nigerian President Muhammadu Buhari died in secret and was replaced by a Sudanese body double named Jubril.
The circumstances surrounding Mr. Kanu’s return to Nigeria remained unknown.
“Recent steps taken by the federal government resulted in the capture of fugitive Kanu on Sunday,” said Nigeria’s attorney general and justice minister, Abubakar Malami, in a statement.
In addition to the charges brought against Mr. Kanu before he jumped bail, he said Mr. Kanu was accused of inciting violence through his broadcasts, including on Radio Biafra, and instigating violence that resulted in the deaths of civilians and security personnel.
The Indigenous People of Biafra’s media secretary, popularly known as I.P.O.B., said he had been lured into a trap but could not say how or where. A spokesman for Nigeria’s intelligence agency, the State Security Service, did not respond to requests for comment.
Nigerian lawyers speculated on Twitter that extradition from the United Kingdom, where Mr. Kanu is a citizen, was unlikely due to the lengthy process. The Metropolitan Police in London did not respond to requests for comment.
Mr. Kanu did tell the Federal High Court on Tuesday about the circumstances surrounding his departure in 2017.
“I went underground because my house was raided,” he explained to the judge. “I had no choice but to flee; otherwise, I would have been killed.”
After the raid, reporters who went to his house said it was riddled with bullets and the windows were smashed. According to Mr. Kanu’s brother, soldiers killed approximately 20 I.P.O.B. members. The military denied any involvement in the raid.
Mr. Kanu’s lawyer, Ifeanyi Ejiofor, stated on Tuesday that his client was brought before the court without the knowledge of his legal team.
Emma Powerful, the media secretary for the separatist group, said he had last spoken to Mr. Kanu two days ago but had no idea where he was calling from.
He said that the next thing he knew, his boss was being led into court in Nigeria’s capital. Mr. Kanu was photographed in handcuffs and a Fendi tracksuit, which was widely circulated on social media.
“The saboteurs among us attempted to lure our leader into yet another trap,” Mr. Powerful explained.
Nigeria, Africa’s most populous country, is dealing with a number of security issues, including kidnapping, militancy in the oil-rich Niger Delta, and the threat posed by Islamist groups in the northeast.
Nonetheless, the government has devoted significant military and financial resources to combating the I.P.O.B., and President Buhari has been vocal about the issue.
Mr. Buhari’s post on Twitter two weeks ago drawing a link between the civil war and recent attacks in the southeast was removed by the social media site. The government then decided to outright ban Twitter in Nigeria.
Some argue that the government’s strategy has backfired.
Mr. Kanu, according to Cheta Nwanze, a partner at the Lagos-based risk advisory firm SBM Intelligence, “has become increasingly popular over the last few years as Buhari’s methods have won him a lot of sympathy.”
Nigeria’s faltering economy has given Mr. Kanu even more clout.
“As things went wrong,” Mr. Nwanze explained, “he began to look more and more like a prophet.”
Ben Ezeamalu reported from Lagos, Nigeria, and Ruth Maclean from Dakar. Elian Peltier contributed reporting from London, and Mady Camara from Dakar.