According to Puerto Rico’s Constitution, the island’s secretary of state should be the new governor if the position is vacant. But at the core of the legal dispute was the question of whether Pierluisi was a legitimate secretary of state in position to become Rosselló’s rightful successor.

“It’s unconstitutional to allow a Secretary of State to become Governor without having been confirmed by both legislative chambers,” the Supreme Court said in a press release.

While Pierluisi had been confirmed as secretary of state by Puerto Rico’s House of Representatives an hour before he took his oath as governor on Friday, Puerto Rico’s Senate had never taken a vote on the nomination.