COLOMBO (Reuters) - Sri Lankan President Maithripala Sirisena dissolved parliament on Friday night and called a general election for Jan. 5 in a move that will likely deepen the country’s political crisis.

Sri Lanka's newly appointed Prime Minister Mahinda Rajapaksa and President Maithripala Sirisena talk during a rally near the parliament in Colombo, Sri Lanka November 5, 2018. REUTERS/Dinuka Liyanawatte

The dissolution, which is expected to be challenged in court, was revealed in an official gazette notification signed by Sirisena which also set the next sitting of parliament for Jan. 17.

The move comes after an intense power struggle in the past two weeks which followed Sirisena’s sudden sacking of Prime Minister Ranil Wickremesinghe and the appointment of former leader Mahinda Rajapaksa, a pro-China strongman, in his place.

Following the sacking, the president suspended parliament in a move which Wickremesinghe said was intended to prevent the ousted prime minister from contesting the decision in the legislature.

Later Sirisena agreed to reconvene parliament on Nov. 14, but that will now not happen.

Wickremesinghe has refused to vacate the official prime minister’s residence saying he is the prime minister and had a parliamentary majority.

Before he signed the papers dissolving parliament and calling the election, Sirisena appointed allies of his and of Rajapaksa to cabinet positions.

“This is a gross violation of the constitution,” Harsha De Silva, a lawmaker in Wickremesinghe’s party, told Reuters in reference to the dissolution of parliament.

Independent legal experts had told Reuters that parliament could be dissolved only in early 2020, which would be four-and-half-years from the first sitting of the current parliament. The only other legal ways would be through a referendum, or with the consent of two thirds of lawmakers.

Given those views, it was not immediately clear how Sirisena can legally dissolve parliament, though his legal experts have said there are provisions for him to do so.

Sri Lanka’s Election Commission was quoted in some local media as saying that it will seek a Supreme Court opinion before conducting the election.

Sirisena also put the police and government’s printing office under his defense portfolio, local media reported.

Ajith Perera, a lawmaker of the Wickremesinghe-led United National Party (UNP) said the party will challenge the decision at the Election Commission first and then may head to the Supreme Court.

Perera said the dissolution was carried out so that Sirisena could avoid defeat in parliament next week.

Keheliya Rambukwella, a spokesman for Sirisena’s government, said the president’s coalition had the backing of 105 lawmakers as of Friday, eight short of a parliamentary majority.

Sirisena has said he fired Wickremesinghe because the prime minister was trying to implement “a new, extreme liberal political concept by giving more priority for foreign policies and neglecting the local people’s sentiment.”

India and Western countries have requested that Sirisena act in line with the constitution while they have raised concerns over Rajapaksa’s close ties with China. Beijing loaned Sri Lanka billions of dollars for infrastructure projects when Rajapaksa was president between 2005-2015, putting the country deep into debt.