A report published on Monday by the European Commission revealed that 39,300 Erasmus students came to study in Spain in the 2011/2012 academic year, or some 15.5 percent of the total students who take part in the exchange programme.
The figure puts Spain ahead of France (28,964), Germany (27,872) and the UK (25,760).
In the same academic year a total of 39,545 Spanish students went to one of the 33 other European countries in the scheme to study or do work placements.
The financial support that Spain offers students of €123 ($160) per month is set deliberately low so that it can be offered to a greater number of Erasmus participants.
In other countries, that figure can be much higher. In Latvia, for example, students receive €641 per month, while the European Community average is €252.
Broken down by city, Granada University received more exchange students than any other in Europe in 2011/2012 and four other Spanish institutions – Madrid's Computense University, Seville University, Valencia University and Valencia Polytechnic – were in the top 10.
Poland, with 6,312 exchange visitors, pipped Spain (4,654) as the preferred destination for professors in the part of the Erasmus programme which sees teachers spend time in a foreign university.
In the report, Androulla Vassiliou, European Commissioner for Education, Culture, Multilingualism and Youth, highlighted the success of Erasmus since its launch in 1987.
She said: "The latest record figures, showing that we have exceeded our target of 3 million Erasmus students, are testament to the enduring success and popularity of the programme."
"Erasmus is more important than ever in times of economic hardship and high youth unemployment: the skills and international experience gained by Erasmus students make them more employable and more likely to be mobile on the labour market."
Erasmus is scheduled to be replaced in January 2014 with a new scheme called Erasmus+.
This will be based on the existing model and will offer four million students the chance to study, train, teach or volunteer abroad between its launch and 2020.
The programme is expected to have a budget of around €14.5 billion for 2014–2020, or 40 percent more than funding for the current education and training mobility programmes.
The current Erasmus funding is some €450 million a year.