Israel's new government faced its first big defeat in parliament today, failing to renew a controversial law that prevents Palestinians living in the West Bank and Gaza who marry Israeli citizens from gaining citizenship themselves.

It was the first major political test for Prime Minister Naftali Bennett, who for nearly a month now has been heading a narrow and diverse coalition that includes left-wing, centrist and Arab parties, along with his own ultra nationalist party.

And he came up short in the early morning vote, failing to secure a simple majority in parliament to extend the so-called Citizenship and Entry Into Israel Law, and underscoring his government's fragility.

The vote was tied 59-59.

The law prevents Palestinians living in the occupied West Bank and Gaza Strip who marry Israeli citizens from automatically gaining Israeli residency and citizenship, although exceptions are made on a case-by-case basis.

Israel first passed the law in 2003, during the height of a Palestinian uprising, saying Palestinians who married Israeli citizens used their legal status to help carry out attacks against Israel.

It was enacted for one year and has been extended on an annual basis, including by former Prime Minister Benjamin Netanyahu, who now leads the opposition.

Mr Netanyahu, who calls Mr Bennett's government a threat to Israel's security, refused to give him a lifeline and voted against it.

Mr Bennett last month reached a power sharing deal with centrist Yair Lapid to unseat Mr Netanyahu.

Together they put together a coalition of parties with 62 of 120 seats in parliament. Under the deal Mr Lapid, now foreign minister, will take over as prime minister after two years.

A few coalition party members did not vote in favour of extending the law, including a member of Mr Bennett's own party.