The flow of seniors headed to Florida edged out people moving to Texas to take new jobs, according to the latest nationwide relocation report.

Texas ranked second in the U.S. for moves with 524,511 new residents moving here in 2017, according to the latest relocation report by Texas Realtors, an Austin-based real estate trade association.

Florida was the top state for moves for the second year in a row with 566,476 migrants. California ranked third for relocations.

"Texas remained a hotbed of relocation activity in 2017 due in part to our diverse job opportunities, record-breaking housing market and booming economy," Tray Bates, 2019 chairman of the Texas Realtors group, said in the report. "This is the fifth year in a row that Texas has gained more than 500,000 new residents from out of state, and we anticipate that trend will continue in the coming years."

Looking at Texas major metros, the largest number of out-of-staters were headed to Harris, Dallas and Tarrant counties. Collin and Denton counties also made it into the top 10.

The combined Dallas-Fort Worth metro had the highest number of incoming residents from out-of-state at 230,118, followed by the Houston area at 203,279.

Most of the people heading to Texas came from California — 63,175 moves. About 7,000 of those relocations headed to Dallas County, according to the new Realtors report.

Dallas also attracted thousands of newcomers from Florida, Illinois, New York and Virginia.

Looking at the out-of-state movers to Texas, the largest share were from Los Angeles, New York City and Chicago.

During the last few years, Texas and the D-FW area in particular have attracted thousands of migrants seeking new jobs.

Texas led the nation in employment gains in 2018, and D-FW was the top job growth market in the country with more than 116,000 new employees.

“As more residents and businesses choose to put down roots in Texas, we need to preserve our favorable conditions to buy, sell, rent and own real estate here,” Bates said.