Bolivia's senior military commanders have held a meeting with Evo Morales, the left-leaning presidential candidate who is leading the polls.
Mr Morales has clashed with the military in the past
The officers pledged to serve Mr Morales loyally if he became president.
They also applauded when he vowed to defend the Bolivian flag and maintain national military service.
If elected on Sunday, Mr Morales will become Bolivia's first indigenous president. His closest rival is the US-educated engineer Jorge Quiroga.
Mr Morales, the candidate from the Movement Towards Socialism party (Mas), has in the past clashed with the armed forces.
During the meeting with senior commanders, he said the military should concentrate on defending his country's borders rather than, as he put it, attacking the Bolivian people.
Bolivia - the poorest country in South America - has recently been marred by instability and violent protests.
Supreme Court head Eduardo Rodriguez was sworn in as caretaker president in June 2005.
He succeeded Carlos Mesa, who came to power in October 2003 after a wave of demonstrations forced president Gonzalo Sanchez de Lozada to flee the country.
Under the Bolivian electoral system, Congress chooses between the two best-placed candidates if no-one obtains 50% of the votes.