BERLIN (AP) — German Chancellor Angela Merkel says the country will take in some 10,000 migrants who were selected by the United Nations’ refugee agency.

Merkel said Monday during a meeting with the UN’s High Commissioner for Refugees, Filippo Grandi, those 10,000 refugees were part of a resettlement program that Germany supports in an effort, “to prevent illegal migration and substitute it through legal opportunities.” It was not immediately clear which countries the migrants would come from.

Grandi thanked Germany for tripling its financial support to the UNHCR in the last three years, making Germany the second biggest donor after the United States.

The UNHCR says Germany in the past year contributed about $477 million to the agency.