The Supreme Court in Guatemala has rejected an appeal by former military ruler Jose Efrain Rios Montt against a ban on his contesting the presidential elections in November.
Mr Rios Montt is accused of ordering killings
All but one of the 13 judges said his candidacy was unconstitutional, and upheld the Supreme Electoral Tribunal's ruling in June banning anyone who had come to power undemocratically from standing in elections.
Mr Rios Montt led a coup in 1982, but was forced from power 18 months later.
Human rights groups accuse him of having ordered the killing and kidnapping of thousands of people during his rule.
Mr Rios Montt defied the tribunal's ruling and started campaigning for the presidency.
A poll in June suggested that Rios Montt had about 7.9% support.
Guatemalan newspaper Prensa Libre says that following the latest setback, Mr Rios Montt's party lodged an appeal with the Constitutional Court - which will have the final say on whether he can stand.
The court has already ruled against him on the same issue twice, in 1990 and 1995.