RIO DE JANEIRO — Brazil’s Supreme Court voted unanimously Wednesday to strike down a sweeping 2003 law that empowered the subjects of unauthorized biographies to quash works they disapproved of.

Under the wide-ranging and controversial law, Brazilians were able to block publication of or have removed from store shelves any book about their lives that was created without their consent. It has mainly been used by celebrities.

The law cast a pall over Brazil’s publishing industry, with many publishers simply declining to put out a book without the subject’s explicit endorsement.

Critics called it possibly the most extreme law regulating privacy and intellectual property in any democratic nation, with many equating the measure with outright censorship.

A national publisher’s association, Anel, helped bring the case examining the constitutionality of the law to the Supreme Court.

A group of famous singers drew strong criticism in late 2013 after they came out publicly in favor of the law in a series of combative interviews and newspaper opinion pieces. Those defending the law included Caetano Veloso, one of the founders of the counter-cultural Tropicalia movement, who spent years in exile under Brazil’s 1964-85 military dictatorship. Another staunch supporter was Roberto Carlos, a romantic singer who succeeded in having an unauthorized biography about him pulled from the shelves in 2007 on grounds that it invaded his right to privacy.

The singers have since remained quiet on the matter and were largely quiet in the run-up to Wednesday’s Supreme Court vote.

While the works most affected by the law have tended to be biographies of stars like Carlos or former FIFA boss Joao Havelange, legal experts have said the law opened the door for much wider impact. By restricting the “publication, exposition and use of the image of a person,” it could also have encompassed newspaper and magazine articles and TV news accounts, legal experts have said.