JOHANNESBURG (Reuters) -South Africa's constitutional court ruled on Monday that former president Jacob Zuma was not eligible to run for parliament in this month's election, a decision that was closely watched as it has the potential to affect the outcome of the election.

The case stems from a decision in March by South Africa's electoral commission to disqualify Zuma on the basis that the constitution prohibits anyone given a prison sentence of 12 months or longer from holding a parliamentary seat.

In 2021, Zuma was sentenced to 15 months in jail for failing to appear at a corruption inquiry.

In April, a court overturned the disqualification, saying the relevant section of the constitution applied only to people who had a chance to appeal against their sentences, which had not been Zuma's case.

The electoral commission then challenged that decision in the constitutional court.

(Reporting by Anait MiridzhanianEditing by Alexander Winning)