Bolivia's Senate has approved plans for early elections later this year, after protests forced President Carlos Mesa out of office last month.
Congress wants to avoid a repeat of last month's protests
Two-thirds of the members approved the plan, which has already been passed by the lower house of Congress.
As part of the agreement to hold early elections, senators also approved an assembly to reform the constitution and a referendum on regional autonomy
The two measures were among the demands made by opposition protesters.
The presidential and congressional elections are due to be held in December, and the referendum in July next year.
Senate speaker Hormando Vaca Diez said the agreement by Bolivian parties on the way forward was an historic step.
"May this be a new period of harmony in the country, generating new hopes," Mr Vaca Diez told a joint session of Congress, just ahead of Tuesday's vote on elections.
The agreement came a month after the head of the Supreme Court, Eduardo Rodriguez, took over as caretaker president following weeks of protests over energy reform which led to the resignation of Carlos Mesa.
Indian leaders from poorer western areas of the country threatened more protests last week after Congress failed to reach agreement on the measures.
The activists have been calling for constitutional reform and nationalisation of the country's gas industry.
Meanwhile residents of the resource-rich eastern provinces are seeking greater autonomy and more foreign investment.