More Mexicans are leaving the United States than migrating into the country, marking a reversal of one of the most significant immigration trends in U.S. history.

A study published Thursday by the Pew Research Center said a desire to reunite families is the primary reason Mexicans go home. A sluggish U.S. recovery from the Great Recession also contributed. Meanwhile, tougher border enforcement has deterred some Mexicans from coming to the United States.

Pew found that slightly more than 1 million Mexicans and their families, including American-born children, left the U.S. for Mexico from 2009 to 2014. During the same time, 870,000 Mexicans came to the U.S., resulting in a net flow to Mexico of 140,000.