Since a change in the local law in 2002, foreigners, resident or not, can legally buy property in Dubai, and apply for a mortgage.
This fuelled a big rise in expats buying homes in Dubai, either for themselves or with a view to renting the place out at a profit.