"I'm not going to argue over the numbers," said Mariano Rajoy at a press conference in Madrid at the same time as the European Commission president announced plans for a mandatory quota system.
During his State of the Union address on Wednesday Jean-Claude Juncker wasted no time in addressing Europe's refugee crisis, a topic which many had touted would be the focus of the morning's proceedings.
Calling for solidarity, he said European countries should on a "compulsory basis" resettle 160,000 refugees, confirming a figure that had become public earlier in the week.
"Now is not the time to be frightened, it is time for bold, determined action for the European Union," he said.
Under the scheme Spain would be expected to take in 14,931 migrants, the third largest share in the European Union after Germany and France.
Spain's acceptance of the quota scheme marks an about turn by the conservative government of Rajoy, which is to contest a general election in December, and comes amid public campaigns across Spain to welcome more refugees.
Until this week the Popular Party government insisted that Spain would only take in 2,739 refugees this year.
The Spanish government "will collaborate and help" in responding to the humanitarian crisis because this is "the majority view of the Spanish people," Rajoy told a meeting of the New Economic Forum at Madrid's Ritz.
Rajoy applauded EU plans to set up a €1.8 billion fund to help African nations better manage their borders and help reduce the number of migrants heading for Europe.
Speaking in a packed European Parliament in Strasbourg Juncker reminded listeners that Europe's history is also a history of immigration, he put the scale of the current crisis in perspective, noting that the asylum seekers only make up 0.11 percent of the European population. That figure was 25 percent in Lebanon, he added.
Lauding the efforts of "far poorer" countries like Turkey, Lebanon and Jordan in dealing with the Syrian refugee crisis, Juncker said countries such as Greece, Italy and Hungary "cannot be left alone to cope with the enormous challenge".
The Commission President also stressed it was unacceptable for countries to accept asylum seekers on the basis of religion - a statement met with applause.
During the speech, Juncker said Europe also needed to create a list of safe countries - chiefly Balkan states - but that his was a "procedural" issue, helping EU countries to prioritize refugees from Syria, rather than overriding the Geneva Convention on refugees.