GettyImages-491637426
King Felipe VI of Spain delivers a speech during a plenary session of the European Parliament in Strasbourg, France, Wednesday, Oct. 7, 2015. Getty Images

King Felipe VI of Spain urged the European Parliament Wednesday to show solidarity and act responsibly during the refugee crisis challenging the continent. More than 500,000 people fleeing conflicts in the Middle East, Asia and Africa have descended upon Europe seeking safety, and Felipe said the nations needed to collaborate to accommodate them.

"There are hundreds of thousands of refugees now coming into Europe full of hope because they see Europe as an area of peace, justice and prosperity," the king said before the parliament in Strasbourg, France, according to Agence France-Presse. "We can't let these people down. We can't disappoint them. We have to be generous."

As of December 2014, Spain had about 5,800 refugees and 7,500 asylum seekers living in the country, according to the United Nations. But it has waffled recently on taking in new migrants, the majority of whom are arriving through Greece, Italy and Hungary. Prime Minister Mariano Rajoy first said the country couldn't handle more than about 3,000 people due to its 22.4 percent unemployment rate, the Wall Street Journal reported. He later relented, saying Spain would take in about 18,000 people total.

Residents' response to this news varied, with cities like Madrid setting aside millions in refugee aid and others like Barcelona organizing language lessons, Fortune reported. "We are working hard to ensure that these people are guaranteed not only reception, but, in the medium and long term, the integration that they deserve in our country,” Deputy Prime Minister Soraya Sáenz de Santamaría said last month.

Felipe said Wednesday that he was "overwhelmed with heartbreak" for the refugees and wanted to work with the other countries to accept the migrants. "Europe has been built on the desire to add and not subtract, to unite and not divide, share knowledge and solidarity," he said, according to Spanish news site 20 Minutos. "We have to work together as a whole European Union."