Chinese buyers led the pack for the fourth straight year, followed by buyers from Canada, the United Kingdom, Mexico and India. Russian buyers made up barely 1 percent of the purchases.

Foreign sales accounted for 10 percent of all existing home sales by dollar volume and 5 percent by number of properties. In total, foreign buyers purchased 284,455 homes, up 32 percent from the previous year.

The jump follows a year-earlier retreat and comes as a surprise, given the current strength of the U.S. dollar against most foreign currencies, which makes U.S. housing even more expensive. Apparently, the value of a financial safe-haven is outweighing the rising costs.

Foreign buyers closed on $153 billion worth of U.S. residential properties between April 2016 and March 2017, a 49 percent jump from the period a year earlier, according to the National Association of Realtors. That surpasses the previous high, set in 2015.

Foreign purchases of U.S. residential real estate surged to the highest level ever in terms of number of homes sold and dollar volume.

But the biggest overall surge in sales in the last year came from Canadian buyers, who scooped up $19 billion worth of properties, mostly in Florida. They are also spending more, with the average price of a Canadian-bought home nearly doubling to $561,000.

"There are more [baby] boomers now than ever before. It's the demographic," said Elli Davis, a real estate agent in Toronto who said she is seeing more older buyers downsize their primary home and purchase a second or third home in Florida. "The real estate here is worth so much more money. They all have more money. They're selling the big city houses that are now $2 million-plus, where they went up so much in the last 10 to 15 years, so they're cashing in."

Despite the anti-immigrant rhetoric from the Trump administration, especially about building a wall between the U.S. and Mexico, nonresident buyers from Mexico were undeterred. Mexican buyers nearly doubled their purchases by dollar volume from a year earlier, coming in third behind China and Canada.

"You could easily make the point that perhaps their uptick was wanting to buy now before new immigration policy was in place," said Adam DeSanctis, economic issues media manager at the National Association of Realtors.

In general, though, Mexicans have been buying less expensive homes. The average purchase price of buyers from Mexico came in at about $327,000, compared with the $782,000 average among Chinese buyers and $522,000 for Indian buyers. Mexicans overwhelmingly favored homes in Texas, while Chinese buyers opted more for California and, increasingly, Texas.

"The environment is much more Asian-friendly than it used to be with churches, grocery stores and schools that cater to their tastes," said Laura Barnett, a Dallas-Fort Worth area Re/Max agent. "I have been told they target good schools and newer homes. Yards are not a high priority, but rather community parks."

It's also possible that Chinese buyers are being priced out of California. The average price of a home purchased by a buyer from China fell from about $937,000 to $782,000, even as the number of properties purchased jumped to nearly 41,000 from 29,000. The drop in purchasing power likely stems from tightened regulations in China with regards to capital outflow.

While international interest was quite strong in the second half of last year, it may now be weakening due to tighter regulations in China and weakening currencies in some international markets.

"Stricter foreign government regulations and the current uncertainty on policy surrounding U.S. immigration and international trade policy could very well lead to a slowdown in foreign investment," said Lawrence Yun, chief economist for the NAR.