Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The agency in Puerto Rico that was created to collect independent and impartial data and provide it to the government is in a battle with the government after Gov. Ricardo Rosselló peppered the agency with officials connected to his administration or his party.

The tug of war between the Puerto Rico Institute of Statistics and the Rosselló administration took a new turn on Thursday after the institute’s legal team reported it would void a lawsuit it filed questioning the legitimacy of some of the governor's appointments to the agency's board of directors.

The institute's executive director, Mario Marazzi, sued the governor and the agency's board of directors on Wednesday, alleging that the institute's current board is illegitimate and trying to strip him of his position without due process or adequate notification.

The lawsuit comes after the institute’s board suspended Marazzi after both the board and the governor called for his resignation in the wake of a scandalous leak regarding his personal life.

The Puerto Rican press reported that government officials from Rosselló’s political party, which favors statehood for the island, leaked documents showing that courts had granted an order of protection to Marazzi’s ex-girlfriend, the mother of his child.

Even with the increased pressure, Marazzi refused to resign. Instead, he’s fighting back in court.

The court battle is the most recent test of whether the institute will be able to effectively function while its very autonomy is under attack.

Government actions and conflicts of interest

The Institute of Statistics was created in 2007 in reaction to decades of data-reporting issues that in part led to Puerto Rico’s current fiscal crisis, including $70 billion in public debt.

Since then, an independent nonpartisan board of directors oversees the institute, which collects data gathered by government agencies, verifies their reporting methods and publishes it in a open source way.

The independence of the one agency that could help the Rosselló administration restore trust lost after Hurricane Maria — when the government’s credibility was called into question after officials couldn’t agree on a definite death toll for months — came under scrutiny in the summer of 2017, before the hurricane struck in September.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

At the time, Rosselló’s administration tried to incorporate the institute under the Department of Economic Development and Commerce and outsource some of the data collection, arguing that the move would save millions of dollars. The plan was later scrapped.

Shortly after, Rosselló replaced four of the institute's seven board members, citing a history of "incorrect" numbers from the institute.

Ricardo Rossello, governor of Puerto Rico, speaks at a summit in Maryland on June 22, 2018. Andrew Harrer / Bloomberg via Getty Images file

Most of the people he appointed then were or had been government officials or contractors. To preserve its autonomy, institute rules state that only one member of the board can be affiliated with the government.

The governor appointed Alex López Echegaray, a board member at Puerto Rico’s public music school El Conservatorio de Música and a former vice president of the island's public TV station (WIPR); a certified public accountant, Bethsié Rosa Reyes; Puerto Rico’s Planning Board director, María del Carmen Gordillo; and Jeanelle Alemar, a contractor and member of a gubernatorial committee.

All of them also financially contributed to Rosselló’s political campaign and his pro-statehood party.

Numbers from Puerto Rico’s electoral comptroller show that Gordillo donated $1,125 to Rosselló and $3,425 to other pro-statehood candidates, while Rosa Reyes gave $2,575 to Rosselló’s campaign and $1,103 to additional pro-statehood candidates. Alemar donated $676 to pro-statehood candidates.

López contributed $500 to Rosselló’s gubernatorial campaign and $1,940 to the pro-statehood party, reported El Nuevo Día, Puerto Rico’s national newspaper.

Courts later nulled the appointments of Gordillo and Alemar, but not others.

Arnaldo Cruz is the only board member that has remained amid all the changes. He's now chair of the institute's board of directors. Cruz also works as the director of research and analytics for Foundation for Puerto Rico, a nonprofit that receives public funds for disaster recovery.

Rosselló finished off 2018 by appointing four new members to the institute’s executive board. One was Manuel Laboy Rivera, secretary of the Department of Economic Development and Commerce, the same government agency that tried to strip the institute of its independence in 2017. The other three are certified public accountant Harry Santiago, economist Nicolás Muñoz and architect Carola Ballester.

Three of these members made donations to Rosselló’s campaign and his pro-statehood political party.

Laboy has donated about $3,775 to candidates running for office under Puerto Rico’s pro-statehood party since 2012, according to data from the electoral comptroller. At least $2,925 were donated to Rosselló. Muñoz donated $6,450 to pro-statehood candidates over the past six years, $2,600 of those contributions went to the current governor.

According to El Nuevo Día, Santiago donated $350 to pro-statehood senators.

While there is nothing illegal or even unethical about making such donations, good government groups and others have stressed the importance of keeping the agency impartial and free from political influence.

Rosselló's feud with the institute comes despite signing an executive order in his first month in office, January 2017, pledging his commitment to increase the government's transparency.

The government's actions concerning the institute have come despite pushback from Puerto Rico’s Financial Oversight and Management Board and the Promesa Congressional Task Force, which oversee Puerto Rico's fiscal recovery.

The American Statistical Association and 15 members of Congress have also called for the institute’s independence several times — even expressing support in a bipartisan letter citing Puerto Rico’s "need for public, independent and unbiased data."

The New York Federal Reserve has also pointed out the importance of the institute' autonomy in letters, reports and recommendations dating to 2012.

FOLLOW NBC LATINO ON FACEBOOK, TWITTER AND INSTAGRAM.