Israeli Foreign Minister Gideon Saar wrote on social media that 20 diplomats and the Consul General would leave Israel, while a task force of seven could remain in the building "with a very limited scope of activity". This was reported by Qazaqyia.kz citing BBC News.

UK Foreign Secretary Ed Miliband responded that some staff had been "temporarily withdrawn" for security reasons, but stressed the mission will "work with the Palestinian people".

Israel said in September it would shut the consulate, in retaliation for UK sanctions on Israeli settlements in the occupied West Bank which are illegal under international law.

The UK government had made last-ditch efforts to persuade Israel not to close the British consulate ahead of Thursday's deadline, after the Israeli government said it would close the consulate within 30 days of the UK sanctions announcement.

The consulate, which was first established in 1838, handles UK relations with Palestinians in Jerusalem as well as in the West Bank and Gaza. It is distinct from the UK embassy in Tel Aviv, which is the UK's main diplomatic hub with Israel.

Israeli Foreign Minister Gideon Saar said the country had implemented measures announced on 8 September in response to UK sanctions. "The British Consulate in Jerusalem is closing its operations today. Accordingly, the sign of the British Consulate in Jerusalem has been removed," he wrote on social media.

However, the British flag could still be seen outside and several staff were seen entering on Thursday morning.

Saar said talks with the UK government had resulted in agreement on certain principles, including that "the consul general and 20 diplomats (including the consul general) are ending their duties and will leave Israel."

But Saar acknowledged that the building is "the property of the British government" and said Israel had authorised "a task force of only seven diplomats with a very limited scope of activity" to operate in the building.

As a result of this agreement with the UK, he said, "no steps will be taken against Israel".

Israeli media had been reporting that the UK had threatened to expel Israeli diplomats from London - raising the prospect of further damaging bilateral relations.

In a written statement on the morning of the deadline, Foreign Secretary Ed Miliband said the UK does not accept Israel has the right to close the consulate. "The UK government reiterates its long-standing view that East Jerusalem is occupied territory."

Following discussions with the Israeli government, he said, the building "will not be closing" and will be known as the UK Mission, Jerusalem from Thursday.

However Miliband said an understanding had not been reached on "necessary assurances for the security and protections of our staff and premises". "Accordingly the UK has temporarily withdrawn a number of staff and families to ensure their safety and security," he added.