After days of uncertainty, Supreme Court rules Pedro Pierluisi is not the legitimate governor of the island.

The Supreme Court of Puerto Rico has ruled that Pedro Pierluisi is not the legitimate governor of the US territory, despite being sworn in on Friday, in a decision that prolongs the self-governing island’s political crisis.

The court’s unanimous ruling on Wednesday means Justice Secretary Wanda Vazquez is next in line to take the post.

If Vazquez does take over the governorship, more protests are expected as many in Puerto Rico see her as being too close to Ricardo Rossello, the disgraced governor who resigned last week following two weeks of demonstrations sparked by a scandal involving leaked chat messages.

Shortly before leaving office, Rossello appointed Pierluisi to secretary of state, a move that put the lawyer and former representative in the US Congress next in line to become governor, according to the island’s constitution.

The rushed nomination was only approved by one chamber of Puerto Rico’s congress, the House, as legislators were in recess at the time.

Pierluisi was then sworn in as governor on Friday when Rossello formally resigned.

In response, Puerto Rico’s senate sued, saying Pierluisi’s nomination was illegitimate without their approval. On Wednesday, Supreme Court judges ruled in favour of the Senate, requiring Pierluisi to resign.

When previously asked by Al Jazeera’s Gabriel Elizondo if he would resign if the Supreme Court ruled against him, Pierluisi responded, “I guess I’ll have to … The Supreme Court will decide, I trust them, and they’ll do the right thing for Puerto Rico.”

Several top legislators had previously opposed Pierluisi’s nomination because, as a private lawyer, he represents the federal control board overseeing Puerto Rico’s finances, which they say is a conflict of interest.

‘The constitution should be respected!’

The court’s decision clears the path for Vazquez, the justice minister, to become governor. The 59-year-old former prosecutor has publicly said she does not want the job, even though she has also indicated that she would be ready to assume the governorship if there was no other candidate for the position.

Some legal experts say she could assume the role, appoint a secretary of state to succeed her, and then step down.

The ruling is expected to lead to more protests as many view Vazquez as too close to former governor Rossello.

“If she takes over, it could mean more protests in the coming days,” Al Jazeera’s Elizondo said. “The justice minister is, quite frankly, not very well liked by many people on the street who took part in these protests,” he added.

Two weeks of protests

Protesters took to the streets of the capital, San Juan, after offensive chat messages between Rossello and other government officials were leaked. In those messages, Rossello called a female politician a “whore”, disparaged Hurricane Maria victims, and made fun of an obese man with whom he posed in a photo.

Corruption charges against several former government officials and a 13-year recession made worse by back-to-back hurricanes in 2017 also fuelled the unrest.

More than two dozen officials resigned in the wake of the leak, including former Secretary of State Luis Rivera Marín.

The Senate president hailed the Supreme Court decision.

“Now is when that detestable group from the chat that lied, mocked, machinated, conspired, violated the law and betrayed Puerto Rico is truly ended and will leave government,” Rivera Schatz said.

Puerto Rico resident Jose Gonzalez, who is from the town of Ponce, told The Associated Press news agency he hoped the political turmoil would be resolved soon.

“I think it was a clear and just decision based on the rights we have here as a nation,” Gonzalez said. “All this is still in process and it affects the economy. People are really destroyed. Politics is stagnating economy in Puerto Rico.”