By James Menendez
BBC correspondent in Caracas
A "recall" referendum on the rule of Venezuela's President Hugo Chavez is to be held on 15 August.
Chavez has vowed to defeat the opposition
Ezequiel Zamora of the National Electoral Council said elections would follow in 30 days if Mr Chavez loses.
Had the poll been held after 19 August and Mr Chavez had lost, the vice-president would have taken over, without holding new elections.
Last week, the council said that the opposition had collected enough signatures to force the recall vote.
After almost a year of delays and bitter arguments, Venezuela's opposition finally has what it wanted - a referendum vote on President Chavez's term in office and crucially a date for that vote.
But Mr Chavez says he has no intention of losing the referendum.
He has already begun campaigning, warning voters of the consequences of an opposition victory.
The president claims the opposition would dismantle all of his programmes for improving health and education amongst the poor.
The opposition say they are trying to free Venezuela from the clutches of a tyrant who has done little to improve people's standard of living.
But it is just a loose coalition of groups from across the political spectrum.
Their challenge will be to choose a leader and a strong set of policies if they are to defeat a man who has dominated Venezuelan politics for the last five years.