For the first time in seven decades, an unelected governor is in charge of Puerto Rico.

Pedro Pierluisi was sworn in during a private ceremony as the island's new governor seconds after embattled Gov. Ricardo Rosselló's resignation became effective Friday at 5 p.m.

Rosselló, who is the first governor elected by the people of Puerto Rico to ever resign, stepped down after two weeks of mass protests triggered by scandals regarding leaked polemic chats and corruption investigations.

Both the incoming and departing governor said in written statements that Pierluisi became governor within Puerto Rico's legal and constitutional framework.

Pierluisi said in a statement that "he was sworn in as the Governor of Puerto Rico in accordance to Section 7 and Article 4 of Puerto Rico's Constitution."

Puerto Rican legal groups and others on the island slammed Pierluisi's interpretation of the U.S. territory's Constitution, with some calling it "an atrocious abduction of Puerto Rico's current Constitution."

The Puerto Rico Bar Association said in a written statement that since "the legitimacy of the newly sworn in [governor] is in question," they are looking into "the necessary procedures to initiate a judicial process to challenge" Pierluisi's oath as governor.

"Laws cannot deviate from constitutional postulates, the intention of the Constitution's authors and the current situation," the organization wrote.

San Juan Mayor Carmen Yulín Cruz, who's running for governor in the 2020 elections, already announced her plans to file an appeal on Monday morning to challenge Pierluisi's position.

At the core of the legal dispute is the question of whether Pierluisi was Rosselló's rightful successor.

Carmen Yulin, mayor of San Juan, during a news conference ahead of a protest in San Juan, Puerto Rico, on July 17, 2019. Xavier Garcia / Bloomberg via Getty Images

Pierluisi cited a part of the Puerto Rican constitution that explains what's supposed to happen if "a vacancy in the governor's seat occurs."

It establishes two key rules: The island's secretary of state should be become the new governor and if the positions of governor and secretary of State are simultaneously vacant, "the law will determine which of the Secretaries of Government will occupy the position of Governor."

Rosselló had chosen Pierluisi to fill the secretary of state vacancy left by Luis G. Rivera Marín, who resigned last month over his involvement in the chat scandal that led to Rosselló’s ouster.

An hour before Rosselló was set to officially resign, Puerto Rico's House of Representatives confirmed Pierluisi's nomination as secretary of state after a lengthy hearing Friday.

Some lawmakers consider the House confirmation to be enough for Pierluisi to officially become the secretary of state, therefore taking over as governor as soon as Rosselló's exit became official.

Others insist that Pierluisi needed the approval of both the House and the Senate in order to become a legitimate secretary of state who could be sworn in as Puerto Rico's governor.

Rep. Jenniffer González, Puerto Rico's nonvoting member of Congress, is one of them.

González is one of the authors of the law that determines who becomes Puerto Rico's governor if both positions, governor and secretary of state, are vacant at the same time.

The law she helped write in 2005 says that "a Secretary of State must occupy his position in property" in order to step up as the governor, suggesting that Pierluisi should have been confirmed by both the House and the Senate.

"The Constitution and the law of succession is very clear," said González in a statement, adding that Justice Secretary Wanda Vázquez should be the new governor since Pierluisi was only confirmed by the House.

Minutes after he officially stepped down, Rosselló said in a press release that Pierluisi was his rightful successor because the law of succession incorporated a recommendation made by the island's Department of Justice which "states that it will not be necessary for the Secretary of State to have been confirmed to assume governance permanently" because "the constitutional text does not require confirmation and that, in case of emergency, such requirement should not be required."

Puerto Rico's ACLU chapter condemned Rosselló's interpretation of the law, saying that he prioritized a legal amendment over a Constitutional mandate.

"The constitution is the document before which our rulers, legislators and judges are sworn in. It is imperative that we cling to it to preserve it; ignorance of the power of the Constitution is an act that causes great concern, particularly in these historic moments in which we live in Puerto Rico," the ACLU said in a statement.

Social justice and pro-independence groups such as Juventud Hostoniana and Movimiento Independentista Nacional Hostosiano, as well as Puerto Rico's Bar Association, have called for constitutional amendments to allow people to elect a new governor in a special election in the future.

"The swearing-in of Pedro Pierluisi as governor of Puerto Rico has been a confusing process, in which he had not even been confirmed as Secretary of State," Movimiento Independentista Nacional Hostosiano said in a statement.

"This situation validates our position that it is necessary to convene a constituent assembly that has deep citizen participation," the group's co-president, Wilma Reverón Collazo, said in a statement.

Follow NBC Latino on Facebook, Twitter and Instagram.