Ecuadorian presidential candidate Fernando Villavicencio was assassinated at a campaign rally on Wednesday evening.
Footage purportedly of the incident shows Villavicencio leaving the event and entering a vehicle when gunshots are suddenly heard.
Villavicencio was wounded and taken to a nearby medical center before he died. Other people at the event were also wounded, but is unclear how many were hit.
"The Ecuadorian people are crying and Ecuador is mortally wounded," his campaign adviser Patricio Zuquilanda told the Associated Press.
"Politics cannot lead to the death of any member of society."
The suspect died from injuries sustained during a shootout with police, according to the Attorney-General's office.
Villavicencio was one of eight candidates in the election scheduled for 20 August.
Opinion polls consistently put in him fifth place in recent weeks.
Ecuador's President Guillermo Lasso confirmed the killing on social media and vowed to hold the culprits accountable.
"For his memory and his fight, I assure you that this crime will not remain unpunished," Lasso said.
"Organised crime has gone very far, but all the weight of the law will fall on them."
He said he would host an urgent meeting with top security officials.
Ecuador's former Vice President Otto Sonnenholzner said "we demand that you do something" at a press conference after the shooting.
"We are dying, drowning in a sea of tears and we do not deserve to live line this," he said.
Villavicencio, 59, was a former union member at state oil company Petroecuador and later worked as a journalist who denounced alleged millions in oil contract losses.
He was elected to Ecuador's National Assembly in 2017 and remained in parliament until May 2023.
Villavicencio was one of eight candidates at the upcoming election and was supported by the Build Ecuador Movement.
He was one of the most critical voices against corruption, especially during the government of former President Rafael Correa from 2007 to 2017.
Zuquilanda said Villavicencio had received death threats in recent weeks, and he traveled with police protection.
Ecuador is in the midst a gang violence epidemic.
Villavicencio was married and is survived by five children.