Image copyright AFP Image caption Mr Wickremesinghe has refused to leave office

The man at the centre of Sri Lanka's political crisis has told the BBC he has the support of parliament and will not leave the grand mansion reserved for the island nation's prime minister.

Last week the president sacked PM Ranil Wickremesinghe and his cabinet and suspended parliament, appointing former leader Mahinda Rajapaksa as the new PM.

But Mr Wickremesinghe says the move is illegal and will not leave office.

The constitutional crisis has already sparked protests and deadly violence.

The situation is being closely watched by regional rivals India and China, who are vying for influence in Sri Lanka. Washington has called for parliament to be convened as soon as possible.

"I still remain the prime minister and I have the confidence of the majority of members of this house," Mr Wickremesinghe told the BBC from his official residence, Temple Trees, a grand, white, colonial-era bungalow, which has, over time, become a symbol of political power in Sri Lanka.

"The constitution states that the president must appoint as prime minister the person who commands the confidence of parliament and I am the person who has that. We have asked for the summoning of parliament so I can prove my majority in the house," he said.

Image caption The BBC's Yogita Limaye spoke to Mr Wickremesinghe from Temple Trees

Mr Wickremesinghe's party has demanded that the house be convened soon and Mr Rajapaksa has suggested this could happen at the start of next week. No date has yet been confirmed.

This is an extraordinary situation for a nation that saw decades of brutal civil war, re-emerged in recent years as a top tourist destination, and which now has two people claiming to run its government.

How did we get here?

The two men in question, Mr Wickremesinghe and Mr Rajapaksa, have spent many years at opposite ends of Sri Lanka's political landscape. But the kingmaker at the centre of the debacle is Sri Lanka's current President Maithripala Sirisena.

Image copyright Getty Images Image caption President Maithripala Sirisena had previously been a member of Mr Rajapaksa's government

To be clear on the extent of the political U-turn by the president, you need to go back to 2015, when Mr Sirisena appointed Mr Wickremesinghe as his prime minister and head of the coalition government that came to power after elections that year.

That itself was seen as a stunning move because Mr Sirisena was originally a member of Mr Rajapaksa's government, but then left to run against him, and defeat him, in a presidential election.

Now, after three years in a fragile coalition, the Sirisena-Wickremesinghe relationship has soured, and the president has revived Mr Rajapaksa's political fortunes by appointing him as prime minister.

Image copyright EPA Image caption Supporters of Mr Wickremesinghe have been gathering outside the official residence he is refusing to leave

What's the situation on the ground?

Mr Wickremesinghe's supporters have been gathering at Temple Trees since the day he was sacked. Near the gates, Buddhist monks have been called in to chant prayers.

Aides suggest it's a way to prevent any use of force to remove the ousted prime minister from the house.

In another part of Colombo, Mr Rajapaksa has begun work. The official website of the prime minister has been updated to show his photo and profile.

Posters congratulating him have sprung up all over Colombo's streets but on Tuesday thousands of Mr Wickremesinghe's supporters marched in protest, with some likening events to a "coup".

What do the other players say?

Mr Rajapaksa has so far refused requests for an interview. In a statement released earlier this week, he explained his position.

"I was aware that at this moment of national peril, the people expected our leadership and protection," he said. "Hence, I accepted the invitation extended to me by the President to assume the position of Prime Minister".

The former president is a popular but controversial figure who ended Sri Lanka's civil war in 2009 but faced criticism for the means by which he achieved victory - many thousands of Tamil civilians are thought to have been killed by government forces in the final months of the fighting.

In his address to the nation, President Sirisena said: "I categorically state that the appointments were made totally in accordance with the constitution and on the advice of legal experts. With all respect, I completely reject the charge that what was done was a violation of the Constitution."

What is surprising many observers is that in 2015 Mr Sirisena and Mr Wickremesinghe campaigned on a platform of abolishing the all-powerful "executive presidency" in Sri Lanka as embodied by Mr Rajapaksa.

Image copyright Buddhika Weerasinghe Image caption Mahinda Rajapaksa is listed on the official website of the prime minister

Within months of winning the election they amended the constitution, reducing the powers of the president.

So, can the president remove the prime minister?

According to Nihal Jayawickrama, a legal expert, there's no provision in the constitution that would enable the president to remove the prime minister.

"There was a time when he could do that. But very dramatic changes were made to the constitution in 2015 when 90 percent of the president's executive powers were taken away. And one of the powers that was taken away was the one to remove the prime minister," he said.

"Everyone is confused. President Sirisena was supposed to give leadership to the change [of government in Sri Lanka]. He did provide it. But for some reason, he backtracked."

I asked Mr Wickremesinghe if he felt like he'd been backstabbed.

"That's to be expected in politics," he said with a smile. "If necessary there will be more protests. The general public opinion does not accept the actions of the president.

"This type of crisis really causes a big issue for the people, a lack of confidence. Look, you promised to restore democracy, you've done so many steps, and here in the main question, you disregard the powers of parliament."

The episode sets a dangerous trend for a country that voted for change in 2015. There are many in Sri Lanka who support neither side, but simply want the democratic process to be followed.