When American Stephen Perry lost his job at a bank in Dubai following the emirate's debt crisis in 2009, he was lucky to be hired by one of neighbouring Abu Dhabi's government firms.
He didn't move house, so it didn't disrupt his wife's job or the kids' schooling, despite the daily 130-km (80 mile) commute each way.
That was still better than the nearly 200kms he used to put up with in the United States, and he considered it a price worth paying to keep the liberal, cosmopolitan lifestyle in Dubai.
But now Perry is in a dilemma and might not be able to manage the commute after all.
Last September, Abu Dhabi, the capital of the United Arab Emirates, a federation of seven Gulf emirates, told state employees that if they lived outside its city limits they would not be eligible for housing allowance, which accounts for about a third of their salaries.
The government has said the new rule was aimed at cutting traffic and road accidents, a nod to the risk of commuting on the busy desert highway between Abu Dhabi and Dubai.
But analysts and industry experts say the policy is designed to help absorb a glut of new high-end homes in Abu Dhabi and revive state developers such as bailed-out Aldar.
"Many new units have come up in Abu Dhabi, reaching the peak of its development cycle. The move is to create new demand and make sure the vacancy rates don't reach high levels," said Matthew Green, research head at property consultancy CB Richard Ellis in Dubai.
The Abu Dhabi government declined to comment on the ruling's implications for the property market.
About 10,000 new houses are expected to hit the market by the end of the year, with a further 43,000 by the end of 2015.
With Dubai's property market still yet to fully recover from the crisis, Abu Dhabi's attempt to boost its own struggling real estate sector once again highlights the competition and shifting dynamics between the two sheikhdoms.
Oil-rich Abu Dhabi is keen to keep more of the wealth it generates, rather than having to support its flashy neighbour.
Dubai's passion for tall towers and fancy hotels landed the emirate with massive debts, forcing Abu Dhabi to step in with a $20 billion bailout.
Home to the world's largest shopping mall, the tallest building and a palm-shaped artificial island, Dubai, the Middle East's party capital, has a 90-percent expatriate population.
"Dubai has something for everyone, and for an expatriate like me it is home; I don't feel out of place.
"I think I am echoing the sentiments of many expatriates," said Sandra Haddad, a Lebanese national who works in Abu Dhabi's aviation sector.
While Abu Dhabi is trying to shake off its more staid image by hosting an annual Formula One race and developing branches of the Louvre and Guggenheim museums, Dubai remains a bigger draw for shoppers and tourists.
Dubai's restaurants, hotels and nightclubs have helped it stage a gradual recovery, in contrast to Abu Dhabi, which is still struggling to emerge from the crisis.
Lower rents, better schools and hospitals make Dubai more expat-friendly, and thousands commute from there to Abu Dhabi for work.
Article continued on next page...