Evo Morales, who is expected to become Bolivia's new leader, has fallen foul of a prank by a Spanish radio station.
Mr Morales invited the impostor to his inauguration ceremony
A journalist, posing as the Spanish PM, called to congratulate him for "joining the Cuban-Venezuelan axis".
Mr Morales told a news conference he had spoken to Jose Luis Rodriguez Zapatero. The PM's office has said the radio station should apologise.
Official election results have yet to be released, but Mr Morales is thought to have won more than 50% of the vote.
He is set to become his country's first indigenous head of state.
The Spanish Church-owned station, Cope, said the sham conversation had been recorded earlier this week and broadcast on Wednesday.
The journalist involved is reported to be a harsh critic of Mr Zapatero's socialist government.
The caller complimented the Bolivian leader on having "joined the axis which links the Cuban brothers and Brother (Hugo) Chavez".
"We are sincerely happy that you are triumphantly joining the new order which we want to establish," he said.
Mr Morales responded by inviting the impostor to his inauguration ceremony.
The Cope journalist then urged Mr Morales to make Spain his first international destination as president.
Prime Minister Zapatero's office described the prank as an "unacceptable joke" and called on the radio station to apologise to the Bolivian leader.
Cope insists the call was meant as a joke.
Mr Morales' has close ties to Cuban leader Fidel Castro and Venezuelan President Hugo Chavez, prompting concerns in Washington as to the direction Bolivia could take under his leadership.