SAN JUAN (Reuters) - The lawyer tapped to succeed Puerto Rico’s outgoing governor faced opposition on Wednesday largely over conflict of interest concerns, two days before the bankrupt U.S. territory’s top executive plans to bow to the demands of protesters and resign.

FILE PHOTO: The flags of the U.S. and Puerto Rico fly outside the Capitol building in San Juan, Puerto Rico May 4, 2017. REUTERS/ Alvin Baez/File Photo

Governor Ricardo Rosselló formally nominated the island’s former nonvoting representative in the U.S. Congress, Pedro Pierluisi, as secretary of state, which would position Pierluisi to take over the government if he is confirmed by lawmakers.

But some members of Rosselló’s New Progressive Party voiced opposition, citing Pierluisi’s role as a lawyer advising the federally created financial oversight board directing Puerto Rico’s bankruptcy, which is highly unpopular with residents.

Anger over the bankruptcy, the handling of back-to-back 2017 hurricanes that killed some 3,000 people, the filing of federal corruption charges against two former administration officials, and the publication of profane chat messages between Rosselló and his close advisers sparked nearly two weeks of street protests this month demanding his ouster.

Last week, the largest protest drew an estimated 500,000 demonstrators to the streets of San Juan, capital of the island of 3.2 million people.

One San Juan resident, William Perez, said the next governor needs to confront the oversight board.

“There’s a serious conflict there, because Pierluisi is one of the people who has had favorable treatment by the board, and that demonstrates that among the leadership of the (New Progressive Party), there’s no one who doesn’t have skeletons in their closet,” he said.

The speaker of Puerto Rico’s House of Representatives, Carlos Méndez, said he favored Senate President Thomas Rivera Schatz over Pierluisi, citing Pierluisi’s role at O’Neill & Borges, one of the two law firms representing the financial oversight board in the bankruptcy.

“There are some issues that have to do with the fiscal oversight board,” Mendez said in a local radio interview, without elaborating. He suggested that Pierluisi does not have enough support from House lawmakers for his confirmation.

A source close to the Rosselló administration told Reuters that Pierluisi’s nomination may be “dead on arrival” as a result of his connection to the oversight board.

‘WILL ANSWER ONLY TO THE PEOPLE’

Maria de Lourdes Santiago, a former Puerto Rico senator who ran against Rosselló in 2016, chastised her former rival, saying, “He has left us with the financial oversight board’s lawyer, under the totally false premise” that Pierluisi is less offensive to the public than other candidates.

To be confirmed, Pierluisi will need votes that equate to a majority of the 51 members of the Puerto Rico House and of the 27 senators. Lawmakers are expected to vote on Thursday in a special session called by Rosselló.

“I appreciate the willingness of Pedro Pierluisi to step forward for the good of Puerto Rico,” Rosselló said in a statement. “I trust that fellow legislators can evaluate this appointment carefully and responsibly.”

Pierluisi told El Nuevo Dia newspaper that he has resigned from the law firm and that his work with the oversight board over the past two years would not interfere with the decisions he would make as governor.

Earlier on Wednesday, Pierluisi released a statement saying he has “listened to the people’s messages, their demonstrations, their demands and their concerns. In this new challenge in my life, I will only answer to the people.”

Replacing Rossello, a first-term governor, became complicated after Secretary of State Luis Rivera Marin, who would have been first in line to assume the office, resigned on July 13 because of his participation in the group chat. Afterward, the second in line for the top government post, Secretary of Justice Wanda Vázquez, said she did not want the position.

Pierluisi previously served as Puerto Rico’s attorney general and its nonvoting representative in Congress from 2008 to 2016. He unsuccessfully ran against Rosselló in the 2016 primary for governor.