QUEBEC - The federal government is giving Quebec $250 million in compensation for costs the province incurred following the influx of asylum seekers across the U.S. border.

Quebec's immigration minister said Thursday the federal money completely covers the province's expenses in connection with the thousands of people who crossed irregularly from the United States in 2017 and 2018.

Simon Jolin-Barrette said in a statement that Ottawa has also agreed to cover the province's expenses related to asylum seekers in 2019.

A federal government news release notes Quebec received roughly 90 per cent of the refugee claimants who entered the country from the United States in 2017 and 2018. Quebec assumed costs related to housing, education and other basic needs.

Roughly 40,000 asylum seekers entered Canada in 2017 and 2018 through what are known as irregular ports of entry. More than 37,000 of them entered through a rural road from New York State that leads into southern Quebec.

Quebec had been negotiating with the federal government for months to cover costs related to asylum seekers. Jolin-Barrette said the $250 million is a major advance and confirms the province's jurisdiction in matters of immigration.