GettyImages-74177495
Real estate agents arrived at a brokers tour showing a house for sale with a list price of $1.3 million May 17, 2007 in San Rafael, California. Justin Sullivan/Getty Images

Republican presidential candidate and real estate magnate Donald Trump may want to rethink his pledge to oust undocumented immigrants from the U.S., because they’re helping to fuel the housing market, according to a study from residential real estate site Trulia released Thursday.

The homeownership rate among immigrants in the U.S. rose to about 50.5 percent in 2015 from just over 48 percent in 1994, with a peak of around 54 percent in 2007. The homeownership rate for U.S.-born citizens, on the other hand, hardly changed, remaining just under 66 percent in both 1994 and 2015 after peaking at nearly 72 percent in 2005, according to the study. The two trends brought the disparity between U.S. born and foreign born homeownership rates to 15.4 percentage points, down from 20.7 in 2001.

The gaps in residence rates between immigrants and U.S. born citizens varied widely by state, the study found. For example, in New York and California, each hosting the largest foreign-born populations, the disparities between foreign and domestic born homeownership rates were 9.7 and 20.1 percentage points.

One likely reason residents born outside the U.S. are buying more homes is that they've simply been here for a while. The number of immigrants who have been in the U.S. for 10 years or more nearly doubled from 34 percent in 1995 to 66 percent in 2014, while the share of those who have been here for five years or less has fallen from 35 percent to 14 percent over the same period, according to the Pew Research Center.

The disparity between immigrants and their U.S. born counterparts may also be explained by the foreign born demographic's improving economic health. Using a determinant of wealth more specific than the homeownership rate, University of Southern California Los Angeles Professor Gary Painter found that the gap between the rate at which immigrants and U.S. born citizens are heads of households has shrunken even faster than the homeownership disparity, from eight percentage points to four over two decades. About 44 percent of U.S. born residents were heads of their households in 2014, compared to just over 46 percent in 2000. As for America's immigrant population, 40 percent were heads of their households in 2014, compared to fewer than 38 percent in 2000.

But why are more immigrants buying homes and becoming heads of their households while residents born in the U.S. are turning away from home buying? According to U.S. Census data, overall rates fell from around 69 percent in 2006 to under 63 percent in 2016—the lowest since 1965.

FindTheHome | Graphiq

For one thing, the housing market hasn't fully recovered from the 2008 bubble, and due to halted construction following the crash, many families who are ready to move in to their new home can't find any affordable options.

The culprits may also be millennials, America’s largest generation. Living with parents is more common among 18- to 34-year-olds now than ever before, according to Pew. And the rates at which members of the same age group are heads of households and employed full-time have fallen almost in lock-step since the early 2000s, according to a 2014 White House report on millennials.