San Juan, Puerto Rico (CNN) The Puerto Rican government has seven days to release death certificates and related data to CNN and a local journalism organization investigating the true toll of Hurricane Maria, a Puerto Rican judge ruled Monday.

The decision comes amid controversy over the US territory's handling of the official death toll from the hurricane, which battered this Caribbean island on September 20.

Puerto Rico had argued that some information contained in death certificates should be kept private in order to protect the identities of the dead. Puerto Rico Superior Court Judge Lauracelis Roques Arroyo ruled these records are a matter of public information and must be released, with the exception of the social security numbers of the deceased.

Data about Hurricane Maria deaths has been the Puerto Rican government's "best kept secret," with officials blocking journalists and academics from obtaining basic mortality data, said Carla Minet, executive director of the Center for Investigative Journalism in Puerto Rico.

Read More