The Religious Affairs Ministry has formulated a budget plan of 45 million shekels to install a computerized system in religious councils across the country.

The first step of implementation will be in the marriage department; each couple that comes to register will be tested via the computer system, which will present a full picture of the couple's past.

The plan comes in the wake of an embarrassing marriage annulment made by the Jerusalem Rabbinate last week, after it discovered it had accidentally married a woman to a transgender man.

Rabbi Hezekiah Samin, Director of Marriage at the Religious Affairs Ministry, said the strange case was exposed by one of the couple's cousins, who told the Rabbinate the groom had been born a woman.

Rabbi Yitzhak Ralbag of Jerusalem's Chief Rabbinate turned to Rabbi Eliyahu Abergel, the head of the city's religious court, who summoned the couple for questioning.

Initially the couple denied the allegations, only admitting the truth after Rabbi Abergel threatened to summon a doctor to perform genetic tests.

The marriage, invalid according to Jewish religious law, was subsequently annulled.

Speaking to Arutz Sheva, Rabbi Samin said that "a woman becoming a man is really a special case. Usually, it's reversed. It's more common for a man to become a woman."

"The new plan to computerize religious councils will help alert us so that incidents like this don't occur in the future," Samin added.