Migration of Mexicans to the U.S. has plunged to a net negative for the first time in more than four decades, bringing down the curtain on the largest wave of immigration in modern American history, according to a new study.

The Pew Research Center found that more Mexicans have been leaving America to return to their home country in recent years than arriving here. It based the study on an analysis of U.S. and Mexican government data.

Mexican migration numbers have been falling for some time. But the Pew figures released Thursday suggest that the surge in legal and illegal Mexican immigration that helped transform America—and remains a contentious issue on the presidential campaign trail—may have peaked for good.

“Mexican migration to the U.S. has been one of the world’s great migration stories, and this data shows it has come to an end,” said Mark Hugo, director of Pew’s Hispanic Research.