Qatar will soon be the first Arab Gulf nation to allow some of its long-time foreign residents to become permanent residents. Issuing a new law, Amir Sheikh Tamim bin Hamad Al Thani directed the government on Tuesday to grant permanent residency to 100 expatriates every year. The law also allows most migrant workers to leave the country without an exit visa.

The new permanent residency law gives priority to children born to a Qatari mother, as well as foreign nationals who have lived in the country for more than 20 years and are considered "valuable" for their skills.

Some two million foreign residents live in Qatar.

Under the new law, permanent residents are entitled to the same social security as Qatar's citizens, including free healthcare and education in government schools. They will also be given priority in government jobs.

As permanent residents, foreign expatriates investing in Qatar will no longer be required to have a Qatari citizen as their partners. The new law also allows them to own real estate in the country.

Once the new law is implemented, permanent residents will be able to enter and leave the country without permission from their employers, which is required for other residents.

The landmark law also allows expatriates serving in the Qatari armed forces to apply for permanent residency.

A Sudanese citizen, serving in the Qatari army for decades, told Al Jazeera on condition of anonymity that he is in the process applying to become a permanent resident.

This law would serve as a gesture of appreciation to many of our Arab brothers who have lived among us for decades and made an honourable stand supporting Qatar against the siege by the neighbouring countries.

Analysts say the new law is part of Amir Sheikh Tamim bin Hamad Al Thani's ambitious Vision 2030, which aims to create a sustainable and modern Qatar in the next 10 years.

"This law would serve as a gesture of appreciation to many of our Arab brothers who have lived among us for decades and made an honourable stand, supporting Qatar against the siege by the neighbouring countries," Abdullah al-Athbah, chief editor of Qatari newspaper Al Arab, told Al Jazeera.

In June 2017, Bahrain, Saudi Arabia, the United Arab Emirates, and Egypt severed diplomatic ties with Qatar, accusing it of funding "terrorism" and fomenting regional instability - allegations Doha denies.

Al-Athbah said the new law is a "first step" in Qatar's "investment in human capital", which will benefit the state in vital areas such as medicine, science and engineering.

"The pioneering new law is part of a national strategy of modernisation and sustained development," a senior Qatari official, who declined to be identified, told Al Jazeera.

On plans to grant just 100 permanent residencies a year, al-Athbah said the move will allow the government to evaluate its policy, revise it and expand it as needed in the years to come.

Qatar is one of the richest countries in the world with an average income of nearly $124,000 a year, a figure that surpasses many Western countries, including the United States.