Puerto Rico Justice Secretary Wanda Vázquez was sworn in as the island’s new governor Wednesday, hours after its Supreme Court ruled that Friday’s inauguration of Pedro Pierluisi as governor was against the law and overturned it.

The unpopular Vázquez had said last month she didn’t want the job amid weeks of political turmoil that saw thousands of protestors demand the resignation of former Gov. Ricardo Rosselló.

Her appointment is expected to draw more demonstrations, as the hashtag #WandaRenincia, or “Wanda resign,” was trending on social media even before Rosselló formally vacated his position.

Pierluisi was appointed secretary of state by Rosselló while legislators were in recess, and only the House approved his nomination. Pierluisi was then sworn in as governor Friday after Rosselló formally resigned. In response, the Senate sued to challenge Pierluisi’s legitimacy as governor, arguing that its approval of Pierluisi was also necessary.

PUERTO RICO POWER VACUUM: AS EMBATTLED GOV. ROSELLO STEPS DOWN, NO ONE KNOWS WHO WILL LEAD THE ISLAND

“It is concluded that the swearing-in as governor by Hon. Pedro R. Pierluisi Urrutia, named secretary of state in recess, is unconstitutional,” the court said in a statement.

Rosselló’s office said at the time that Pierluisi did not need to be confirmed by both chambers of Puerto Rico’s legislature. Pierluisi supporters cited a 2005 law said that in cases where a secretary of state is taking over as governor, they do not have to be approved by both houses of the legislature.

NEXT-IN-LINE TO BE GOVERNOR OF PUERTO RICO SAYS SHE HAS ‘NO INTEREST’ IN THE POSITION

The Senate’s lawsuit claimed that the law went against the island’s constitution and the Supreme Court agreed.

Pierluisi said before the ruling that he would respect the court’s decision, no matter what it would be.

CLICK HERE TO GET THE FOX NEWS APP

Rosselló first announced on July 24 that he would resign after two weeks of protests over mismanagement and leaked chats that showed him and his top aides denigrating victims of Hurricane Maria and other Puerto Ricans.

Fox News’ Louis Casiano and The Associated Press contributed to this report.