CARACAS, Venezuela (AP) — Venezuela’s highest court on Friday upheld a ban on running for office that the socialist-led government placed on Maria Corina Machado, a longtime government foe and the candidate of an opposition faction backed by the United States.

Machado, a former lawmaker, won the opposition’s independently run presidential primary in October with more than 90% of of the vote. Her victory came despite the government announcing a 15-year ban on her running for office just days after she formally entered the race in June.

BIDEN POLICIES DRIVING MASSIVE SURGE IN VENEZUELAN MIGRATION TO SOUTHERN BORDER, REPORT FINDS

She was able to participate in the primary election because the effort was organized by a commission independent of Venezuela’s electoral authorities.

Machado rejected the ban and had continued to campaign. She had argued that she never received an official notification of the ban, and insisted that voters were the rightful decision-makers of her candidacy.

anti-Maduro rally

Venezuelas top court has banned opposition leader Maria Corina Machado from running in the nations presidential election. ((AP Photo/Eduardo Verdugo))

Machado in December filed a claim with the Supreme Tribunal of Justice to confirm that the ban was null and void, and to pursue an injunction to protect her political rights.

Instead, the court ruled against her and upheld the ban.

Preventing Machado and other candidates from running would go against an agreement between the government of President Nicolas Maduro and U.S.-backed opposition figures last year.

CLICK HERE TO GET THE FOX NEWS APP 

The agreement signed by the opposing sides in October in the Caribbean island of Barbados prompted the U.S. government to ease some sanctions on Venezuela’s oil, gas, and mining industries.

However, the administration of U.S. President Joe Biden has threatened to reverse some of the relief if Maduro’s government fails to lift bans preventing Machado and others from holding office, and if it fails to release political prisoners and wrongfully detained U.S. citizens.