BRASILIA/SAO PAULO (Reuters) - A Brazilian court has stripped the patent protection of a Gilead Sciences Inc big-selling hepatitis C treatment in Brazil at the behest of a presidential candidate who pushed for the move, paving the way for cheaper generics.

FILE PHOTO: A Gilead Sciences, Inc. office is shown in Foster City, California, U.S. May 1, 2018. REUTERS/Stephen Lam/File Photo

The ruling by federal judge Rolando Valcir Spanholo invalidated the exclusivity patent for the drug sofosbuvir, sold under the brand name Sovaldi. Earlier in September, center-left presidential candidate Marina Silva and her running mate filed a request asking that the patent be overturned, saying such a move would significantly reduce costs for patients.

Sovaldi was the first of a new generation of drugs that are effectively a cure for the serious liver disease. But despite Sovaldi representing a major treatment advance, Gilead came under intense criticism for a price that initially came to $1,000 a pill in the United States. Other nations, such as India, and consumer groups have also challenged patents on the drug.

The Brazil move comes as local pharmaceutical manufacturers Farmanguinhos-Fiocruz, Blanver and Microbiologica Quimica e Farmaceutica fight for the right to produce a significantly cheaper, generic version of the drug, with the support of Silva, a candidate who has championed environmentalism, relatively orthodox economics and a robust social welfare net on the campaign trail.

According to local media, Farmanguinhos has proposed to Brazilian health officials producing a generic version of sofosbuvir for $8.50 per pill, about a quarter of the price charged by the U.S. biotech company in the South American country.

The court’s decision was first disclosed by Silva at a rally earlier on Monday in the northeastern city of Maceio.

A representative for Gilead did not return calls requesting comment.

The patent decision underscores how individual companies have been dragged into Brazil’s volatile presidential campaign, with right-wing front-runner Jair Bolsonaro criticizing certain investments by Chinese firms, and investors girding for more intervention in state-controlled companies should a leftist win.

Brazilians will go to the polls on Oct. 7 for the first round of the nation’s presidential election. If no candidate wins a majority of valid votes, as is likely, there will be a runoff on Oct. 28.

Right-wing Congressman Bolsonaro and leftist former Sao Paulo Mayor Fernando Haddad are seen as most likely to face off in the second round, in what polls indicate will be a tight race.

Gilead shares closed slightly higher at $75.62 on Nasdaq.