|The ruling splits families by preventing Palestinians from obtaining Israeli citizenship through marriage [Reuters]
Israel's Supreme Court has upheld a controversial law that bans most Palestinians who marry Israelis from obtaining either citizenship or residency in the country.
In a six-five ruling, the court agreed that Palestinians who gain Israeli citizenship through marriage pose a security threat.
Parliament passed the law in 2003, at the height of the second Palestinian uprising, a time when fighters from the West Bank frequently entered Israel to carry out deadly attacks.
The law is believed to have prevented thousands of Palestinians from living with their spouses.
Civil rights groups had argued that Israel's Basic Laws, the country's de facto constitution, grant all citizens the right to family life. They also say that few Palestinian spouses of Israelis have ever been involved in violence.
"It is a dark day for the protection of human rights and for the Israeli Supreme Court," lawyers Dan Yakir and Oded Feller, from the Association for Civil Rights in Israel (ACRI) said in a statement.
ACRI was one of three rights groups that had appealed to the Supreme Court over the law.
The 2003 law bans granting citizenship or residency to Palestinian spouses of Israelis, but allows for certain exemptions for people who are not believed to pose security risks, including Palestinian men older than 35 and women older than 25.
Last year, only 33 out of 3,000 applications for exemptions were approved, said lawyer Sawsan Zaher, who filed a challenge to the law on behalf of the Adalah Arab rights advocacy group.
She accused the government of interfering in the personal lives of its citizens.
"The court has failed in its main role, which is defending the rights of the minority," Zaher said.
Al Jazeera speaks to Hassan Jabareen from the Adalah Arab rights advocacy group about the ruling
Adalah condemned the ruling, with its lawyers Hassan Jabareen and Zaher saying the law "has no parallel in any democratic country in the world".
Jabareen told Al Jazeera that the ruling sets a dangerous precedent for racial hatred against Palestinians.
"The dangers of this decision are that it may legitimise many racist laws against Arabs living in Israel," he said.
"Furthermore, we are speaking about splitting families," he said.
The petitioners said the law violated the right of Palestinians married to Arab Israelis to a family life, but in a late-night ruling, the Supreme Court said human rights could not override security concerns.
"Human rights are not a prescription for national suicide," wrote Justice Asher Grunis, who is poised to become the next Supreme Court president.
Yakir and Feller accused the court of stamping "its approval on a racist law, one that will harm the very texture of the lives of families whose only sin is the Palestinian blood that runs in their veins".
Initially applicable for one year, the law was extended for security reasons, but has been challenged by rights groups on more than one occasion.
Palestinian-Israeli MP Jamal Zahalka, of the Balad party, said the court "had failed the test of justice".
"This decision will encourage the racist groups in the Knesset [parliament] to enact more anti-Arab, anti-democratic and anti-human rights laws," he said.
"The court's ruling pours oil on the fire of racism burning in the Knesset and removes any fear that the Supreme Court will repeal laws on grounds of unconstitutionality."
Mohammed Barakeh, an Palestinian-Israeli MP with the Hadash party, said the ruling proved a "wave of racism" was sweeping through Israeli institutions.
"This law, which differentiates between people in a repulsive, racist fashion, sets standards for an individual's personal life and denies Arabs their right to choose their life partner," he said.
Zehava Galon, an MP from the left-wing Meretz party who filed her own appeal to the Supreme Court against the law, echoed Adalah's criticism.
"The Supreme Court has failed in its duty to defend the principle of equality of all citizens before the law and to fight against racism," she told Israeli public radio.
Judicial commentator Moshe Negbi said the ruling showed the court had shown preference to the state's Jewish character "to the detriment of its democratic character".
Zeev Elkin, chairman of the ruling right-wing coalition, welcomed the court's demonstration of "common sense".
However, Elkin expressed concern "that almost half of the Supreme Court judges thought it was possible to open the gates of Israel to tens of thousands of Palestinians" who were trying "to implement the right of return by stealth through marriages of convenience".
Im Tirtzu, a right-wing student group, described the move as a step to "prevent the state of Israel from being flooded by hundreds of thousands of Palestinians".
The group denounced the decision to oppose the ruling by outgoing Supreme Court President Dorit Beinish, describing it as "a disgrace", and expressing hope that her retirement from the court in February "will signal an end of the anti-Zionist era in the Supreme Court".