LA VICTORIA, Venezuela (Reuters) - Venezuelan opposition candidate Edmundo Gonzalez said on Saturday he will ensure all political parties are free to operate if he unseats President Nicolas Maduro in a July vote, and he urged the military to uphold the country's institutions as intended by the constitution.

Gonzalez, a former ambassador to Algeria and Argentina, was named by the Unitary Platform opposition coalition in April as its candidate after a ban against landslide primary winner Maria Corina Machado's holding office was upheld by the Supreme Court.

The opposition has said Machado's ban is illegal and an attempt by Maduro's government, which has overseen a deep economic crisis in the country, to tamp down support for the opposition in the July 28 presidential election.

Standing on a large truck bed, Gonzalez and Machado spoke to a chanting crowd of about 3,000 in La Victoria, Gonzalez's hometown in central Aragua state.

Gonzalez said he will ensure political movements can exercise their rights under the constitution, urging voters to imagine a country "where the president does not insult or see his adversaries as enemies."

"To the national armed forces - you play a fundamental part in the security of all of us, being guarantors of institutions under article 328 of the constitution," Gonzalez, 74, said.

The previously low-profile Gonzalez told Reuters this month he believes Maduro's government would have banned him from office by now if it intended to.

Machado has called on voters to throw their support behind Gonzalez, whom she calls a "good and honest" man, and has held campaign events waving large images of him.

If the opposition fails to win the election, supporter Marian Tesorero, 22, said: "I will leave the country. I can't stand this anymore."

Tesorero, who is finishing her high school studies after being forced to halt them years ago for economic reasons, said she dreams of attending university and meeting her young niece, who was born abroad to her migrant sister.

"We must win because we want something better. There must be a change," Tesorero's mother, Jenifer Escobar, 51, said.

Gonzalez will appear on the ballot on behalf of three opposition parties, while Maduro, who is seeking his third re-election, will appear for 13 including his Socialist Party.

Machado and Gonzalez have demonstrated harmony, and Machado's campaigning with a photograph of Gonzalez "is working," said Saul Cabrera, president of local consulting firm Consultores 21.

A recent survey by the firm showed 50% of voters backing Gonzalez, with 32% favoring Maduro. The poll had a margin of error of 3.16%.

At a ruling party event in La Victoria, Socialist Party leader Diosdado Cabello said the opposition's "perverse project against the country" will be defeated.

(Reporting by Vivian Sequera in La Victoria, additional reporting by Deisy Buitrago in Caracas; Writing by Julia Symmes Cobb; Editing by Cynthia Osterman)

By Vivian Sequera