By Gopal Sharma

KATHMANDU (Reuters) - Nepal's president held talks with leaders of three main political parties on Monday to come up with a consensus candidate for prime minister and try to end revolving-door politics that has seen 23 governments in 26 years.

Prime Minister K.P. Oli, facing defeat in a no-confidence vote in parliament brought by his allies, the former Maoist rebels, resigned on Sunday, opening the way for a political tussle to lead the country of 28 million people.

President Vidhya Devi Bhandari had invited Oli, Maoist chief Prachanda and the leader of the Nepali Congress party, Sher Bahadur Deuba, to discuss a new government, an aide to the president said.

"The meeting is to tell them to move ahead unitedly,” the aide, Bhesh Raj Adhikari, told Reuters. “The country has many problems and all major parties must unite to resolve them."

Nepal has been in a political crisis since September when a Constituent Assembly approved a new constitution amid a political row with minority Madhesis in the southern plains over the creation of federal states under the new system.

Ethnic Madhesis, who have long complained of neglect by a ruling elite drawn from the hill region, said the creation of the states would marginalize them by dividing their homeland.

Maoist chief Prachanda, who goes by just one name, said the outgoing administration failed to address grievances of the plains people. He is considered the frontrunner to succeed Oli, with the support of the Nepali Congress.

Oli's communist UML party said it would not support the Maoists' bid for power after they had brought down Oli's government.

"There is no possibility of us joining,” senior UML official Pradip Gyawali told Reuters. “We’ll remain a strong opposition.”

Political instability has played out against the backdrop of a contest for influence between neighbors India and China.

India has long considered the Himalayan nation its area of influence, and has often faced accusations of interference from Nepal.

India rejects the allegations but has grown concerned about China's involvement in Nepal's infrastructure development.

Prospects for stability remain dim, at least until elections scheduled for 2018, analysts say.

"Nepal's leaders have once more demonstrated that they are obsessed with politics as usual at a time when they should be working to rescue the economy," said Kunda Dixit, editor of the Nepali Times weekly.

Nepal's economy grew by 0.77 percent in the year to July 15, the lowest rate since 2001/02.

(Writing by Sanjeev Miglani; Editing by Robert Birsel)