CAIRO, Egypt (AP) — An Egyptian court on Tuesday ruled that members of the Bahai faith can get new ID cards that don't state their religious affiliation, ending four years of court controversies, including rulings that denied Bahaism exists as a religion.

The decision followed an appeal filed by two Bahai families who were refused ID cards by the Egyptian interior ministry because their religion is not recognized under the law here. Egypt recognizes only Judaism, Christianity and Islam and requires all identification papers and other documents, such as birth certificates, to state an individual's religion.

The court said the Bahais would be "allowed to put a hyphen" in the "religion" column in documents, instead of filling it out. The two Bahai families had asked the court to allow them to leave the column blank.

But in its decision, the Supreme Administrative Court in Cairo also stated that Bahaism is not a recognized religion in this country. "The officially recognized religions are Judaism, Christianity and Islam, and there are no other recognized religions," it said.

The phrasing reflected a compromise — while not going against the law, it allowed for the Bahais, who are estimated at about 2,000 people in Egypt, to get documents.