Henry Okah denied that he was the leader of Mend
One of Nigeria's main rebel leaders, Henry Okah, has been freed from jail as part of a government amnesty.
Mr Okah had been held for more than a year on charges of treason.
He was said to be one of the heads of the Movement for the Emancipation of the Niger Delta (Mend), but on leaving jail denied he was the leader.
Mend claims to be fighting for a fairer distribution of Nigeria's oil wealth. The release came hours after it launched a deadly attack in Lagos.
Mr Okah was arrested in Angola in 2007 and charged with treason and gun-running charges.
His release has been a key demand of his group.
At a hearing in the central city of Jos, Judge Mohammed Liman told Mr Okah he was discharged.
"Having reviewed what the attorney general said, you have become a free man at this moment," said the judge.
On his release, Mr Okah said he would hold consultations with the rest of the group.
In a bid to end years of rebel attacks on the oil industry, the government offered militants an amnesty three weeks ago.
Officials said any rebel willing to give up their weapons by October would benefit from a rehabilitation programme, including education and training opportunities.
But Mend leaders said they would reject the amnesty - and have since claimed responsibility for several attacks including one earlier in Lagos, away from its usual area of operation in the Nigeria Delta.
The government's critics say the amnesty is unlikely to work because the unrest is not a straightforward political struggle but involves economic and land rights.