Nigeria's former President Olusegun Obasanjo has quit the ruling People's Democratic Party (PDP) ahead of the 28 March elections, tearing up his membership card in public.
Mr Obasanjo has been fiercely critical of President Goodluck Jonathan, who is seeking re-election on a PDP ticket.
Mr Jonathan is facing a strong challenge from opposition candidate Muhammadu Buhari.
The elections, due on 14 February, were postponed over security concerns.
BBC Nigeria analyst Ibrahim Shehu Adamu says Mr Obasanjo's decision is a major blow to the PDP, showing the divisions that have hit the party as it battles to extend its 15-year rule.'Serious embarrassment'
In a statement, the PDP described Mr Obasanjo as a "revered leader of our party" and said it was "deeply saddened" by his resignation.
It added that it was "bewildered" by the former president's choice to tear up his party membership card in public.
Mr Obasanjo, 77, was a founding member of the PDP and led the party to two resounding victories after military rule ended in 1999.
So, his decision to quit the PDP may knock the morale of some party activists and persuade undecided voters to back the opposition in the hard-fought presidential and parliamentary elections.
But Mr Obasanjo's move does not come as a complete surprise. His influence within the party has been declining for quite some time and he probably found it difficult to see President Jonathan - whom he once mentored - ignoring his advice.
More worrying for Nigerians will be the role of the military. There are growing suspicions that it is backing Mr Jonathan, raising doubts about its impartiality and the credibility of the elections.
Last week, Mr Obasanjo raised fears of a coup. Many Nigerians will be hoping that his fears are misplaced and that Nigeria holds a free and fair election in which the losing candidate gracefully accepts defeat.
The Nigerian military issued its own statement, calling Mr Obasanjo, a former military ruler as well as an elected president, "a serious embarrassment" after he criticised its role in the postponement of the elections.
Our correspondent says the military's statement has raised concern among many Nigerians that it is taking sides in a political dispute rather than remaining neutral.
Prior to tearing up his membership, Mr Obasanjo told local media outside his residence that he was expecting to be ejected from the party.
"They said they want to expel me from PDP, although I have not been told, but I have my ears on the ground," he said.
'Going for broke'
Mr Obasanjo said he would not be joining another party.
"I will only be a Nigerian, I'm ready to work with anybody regardless of political affiliation. Why would some people say they want to send me away, they don't need to bother themselves, here's your membership card, take it," he added.
Despite his pledge not to defect to another party, Mr Obasanjo has been vocal in his support for Mr Buhari, the candidate of the All Progressives Congress (APC), although he has fallen short of offering an outright endorsement.
Last week, Mr Obasanjo told London's Financial Times newspaper that he hoped the president was "not going for broke and saying: 'Either I have it or nobody has it'".
Mr Jonathan hit back at Mr Obasanjo, accusing him of threatening "national security" by whipping up opposition to his rule.
"It is very regrettable that in your letter, you seem to place sole responsibility for the ongoing intrigues and tensions in the PDP at my doorstep, and going on from that position, you direct all your appeals for a resolution at me," Mr Jonathan said.
Nigeria's election commission postponed the presidential and parliamentary election after the military said it would not be able to guarantee security at polling stations while it fought militant Islamist group Boko Haram in the north-east.
Mr Jonathan is contesting his second presidential election. His presidency has been marred by powerful PDP members defecting to the newly formed APC, fuelling speculation that he could be defeated in the election.
He has also been strongly criticised for failing to curb Boko Haram's insurgency.
Thousands of people have died as a result of the conflict over the past six years, while more than three million people have been forced from their homes.
The militants control a large stretch of land in north-eastern Nigeria and have stepped up attacks on neighbouring countries.