Jerusalem: Israel`s controversial justice minister Wednesday admitted her mistake after posting a video online purporting to show a black migrant attacking a resident when the footage was apparently recorded in another country.

Ayelet Shaked posted the video on her Facebook page Tuesday as the High Court was poised to rule on a law related to illegal immigrants with the aim of showing the "intolerable" situation facing residents of southern Tel Aviv.

"There was indeed an error," Shaked, of the right-wing Jewish Home party, told army radio, adding she had removed the video from her page.

Some local media reported that the video had been recorded in Turkey.

Many migrants entering Israel illegally from Africa live in poor neighbourhoods in southern Tel Aviv.

Some residents have reacted angrily to their presence, and Shaked, known for her right-wing political stances, has taken a hard line against illegal immigrants.

It is not the first time Shaked has sparked controversy with a Facebook post.

Last year, she endorsed an article written in 2002 that labelled Palestinian militants as "snakes", described "the entire Palestinian people (as) the enemy" and said anyone supporting terror should be killed.

The post quickly disappeared from her Facebook page, but not before it was reported by the Israeli media.

Israel`s top court on Tuesday overturned a provision of a law that would have allowed illegal immigrants to be held for up to 20 months without trial.

The court ruled that 20 months was a "disproportionate" period, though other provisions in the law were approved.

Official figures show that nearly 50,000 Africans are in Israel illegally, mostly from Eritrea, which is regularly accused of human rights abuses, and from war-ravaged South Sudan.