Saudi Arabia has warned its citizens against marrying "unidentified" women from areas along the border with Yemen, adding that those who marry foreigners without permission will be punished.

The interior ministry said in a statement on Thursday that it had noted that some elderly men, particularly those living near the border, had approached authorities to legalise the situation of their "unidentified" wives, despite knowing they were breaking the law.

"Due to the serious consequences resulting from this issue, [the interior ministry] urges citizens to observe the law, pointing out that anyone who marries a foreign woman without prior permission will be brought before the competent authorities for punishment for dealing with unidentified people," the interior ministry said.

The conflict in Yemen has forced at least 30,000 Yemenis and nearly 10,000 third-country nationals to flee to Saudi Arabia, according to the UN refugee agency.

Since the beginning of the Saudi-led air strikes on the country, many of those fleeing have smuggled themselves illegally throught the two countries' 1800km border.

Others have stayed in the kingdom beyond their permitted visa period.

In May, the Saudi king issued an order allowing Yemenis living illegally to settle their situation, prompting thousands to queue at the Yemeni embassy in Riyadh to receive a residency permit.

The interior ministry indicated that it was during that period that Saudi elderly men wanted to settle the situation of their wives.

'Desperation and poverty'

It is common for elderly Saudi men to marry much younger Yemeni women, Saba Zawbah, national coordinator for human rights projects at the UN development agency, told Al Jazeera. Many of them are underage girls, she said.

Zawbah said that "tourism marriage" had been very common in Yemen over the recent years, whereby "Saudi men in their forties and fifties would marry young women aged as young as 12 in return for money given to her family."

"The desperation and poverty of Yemeni families in Saudi Arabia could lead to a similar situation there," she said.

In the Middle East, Saudi Arabia and Yemen are the only Arab countries that do not have laws setting a minimum age for marriage.

According to a December 2011 Human Rights Watch report, approximately 14 percent of girls in Yemen, the Arab world's poorest nation, were married before the age of 15, and 52 percent were wed before they turned 18.