Bolivia head in immigrants' plea
(right) Several thousand gathered to hear Evo Morales speak
It is thought some 250,000 Bolivians live in Spain, but only around 100,000 are legally resident.
Mr Morales's trip to Spain comes as he gears up for December's presidential election, which he is expected to win.
Several thousand people, many of them Bolivian, gathered at a bullring in Leganes, on the outskirts of Madrid, to hear Mr Morales speak.
"We are working with the United Nations to reach an agreement so workers, who contribute socially and economically, are no longer considered illegal," Mr Morales said.
(right) Mr Morales is leading the opinion polls ahead of December's vote
"We all have the right to live in any part of the world, respecting the laws of each country."
Spain, which has the highest proportion of immigrants of any EU country, has been hard hit by the recession.
Bolivians at Sunday's event in Leganes said they had experienced difficulties in getting visas and finding work.
During his speech, Mr Morales also hit out at the presence of the US military in South America, to loud cheers from the crowd
"In Latin America, where there is a US military base there are military coups," he said.The US and Colombia are discussing an accord to allow the US military access to several Colombian bases, which both governments say will help the fight drug-trafficking and terrorism.Campaign
ing is already under way in Bolivia ahead of the 6 December presidential poll