The former Ecuadorean presidential candidate Nelson Zavala has had his political rights suspended for a year and been fined for homophobic comments.
An electoral court sentenced him for saying gays were "immoral" and suffered from "severe deviation of conduct" during the February election campaign.
Lawyers for Mr Zavala, an evangelical preacher who says he can "cure" gay people, said he wouldappeal.
The candidate came last out of eight candidates with 1.23% of the votes.
President Rafael Correa was re-elected for a third term with nearly 60% of the vote.
The ruling bars Mr Zavala from standing as a candidate, affiliating himself or being involved with a political party or movement.
'True Ecuadorian family'
He was also ordered to pay more than $3,000 in fines.
Gays and lesbian activists applauded the decision, which was called a "milestone".
Mr Zavala's comments in February were denounced to the electoral authorities by a number of groups.
Judge Patricia Baca Mancheno found Mr Zavala violated the electoral code, which "forbids candidates of publicly expressing any thoughts that discriminate or affect other people's dignity or utilise symbols, expressions or allusions of a religious nature."
Mr Zavala called homosexuals "sinners" on more than one occasion.
At the hearing, the preacher said his opinions were aimed at the country's constitution, which "destroys the true Ecuadorian family" by allowing same-sex marriage.
He also criticised the judges on the hearing.
"Those who judge me will be judged," he said, adding that "God will judge us all in the end."
"The tribunal does not have influence on the kingdom of heavens and those who celebrate today will cry on judgement day."