The United Arab Emirates has introduced a new law requiring compulsory military service for adult males.

The official state news agency WAM announced the move on Saturday, saying the law aimed to "instill values of loyalty and sacrifice in the hearts of the citizens".

The legislation requires that male high school graduates, aged between 18 and 30, serve nine months. Those without a high school diploma must serve two years. Military service for female Emiratis will be voluntary.

Emirati citizens are outnumbered by foreign workers and the country's leaders have taken steps to get more nationals into public and private sector jobs, including the military.

Reuters news agency reported in January that the UAE prime minister, Sheikh Mohammed bin Rashid Al Maktoum, said on his Twitter account: "Protecting the nation and preserving its independence and sovereignty is a sacred national duty and the new law will be implemented on all.

"Our gains are a red line that must be protected."

Earlier this year, Gulf neighbour Qatar enacted a similar conscription law, with all male Qataris between the ages of 18 and 35 required to serve with the country's armed forces for at least three months if graduates and four months if not.

The first group of conscripts, numbering 2,000, reported at the beginning of April and are nearing the end of their mandatory service period.

Kuwait has also considered reintroducing conscription, with the Kuwait Times reporting that a parliamentary panel was preparing a draft law to that effect.

Source: Al Jazeera and agencies