Otto Sonnenholzner, a conservative politician, was with his family and supporters when shots rang out, according to BBC.
He is not believed to have been the target. But the campaign has been marred by a surge in gang attacks.
Candidate Fernando Villavicencio was assassinated in the capital last week.
The incident involving Sonnenholzner, 40, occurred on Saturday in Guayaquil, Ecuador’s largest city.
A video posted on social media shows the former-vice president talking to supporters in the restaurant before shots are heard, sowing panic. Local journalists said there was a robbery in the vicinity.
Afterward, Sonnenholzner tweeted: “Thank God we are all fine but we demand an investigation into what happened… We can’t go on like this.”
While no other presidential candidate has been directly targeted since Villavicencio’s murder in Quito, shootouts like this serve to demonstrate just how dangerous Ecuador has become.
They are, sadly, part of everyday life, especially in cities like Guayaquil which has been overrun by drug traffickers.
Earlier this week, a similar thing happened during the campaign event of fellow candidate Daniel Noboa. And a local politician was shot dead in northern Esmeraldas province.
MNA/PR