More than 30,000 African asylum seekers who entered Israel illegally protested in Tel Aviv on Sunday, police said, in the biggest rally ever staged by migrants in Israel.

"More than 30,000 demonstrators marched peacefully in Tel Aviv," police spokeswoman Lubra Samri said.

Gathered in the coastal city's central Rabin Square, the protesters sharply criticised Israel's refusal to give them refugee status and the detention without trial of hundreds of asylum seekers.

"We are all refugees" and "Yes to freedom, no to prison!" they chanted in English, with Israeli rights activists also joining the march.

Ultra-Orthodox MP Eli Yishai, the hardline former interior minister who in 2012 led the government campaign to round up and deport tens of thousands of illegal migrants, denounced the protest.

Yishai said that the "infiltrators", as authorities call them, were encouraged by "anti-Zionist human rights organisations".

Rights groups say most African migrants in Israel cannot be deported because their lives would be under threat if they returned to their homes in Sudan and Eritrea.

Yishai told the website of Maariv daily that Tel Aviv, where many of the migrants live, "long ago became an African city".

He said the demonstration was "a sharp and clear cry for the state of Israel and judicial and law enforcement authorities to apply all the means at their disposal to return the infiltrators to their countries".

Dawud, an Eritrean asylum-seeker at the protest, said: "We have fled persecution, dictatorships, civil wars and genocides.

"Instead of considering us refugees, Israel treats us like criminals," he added, without giving his full name.

Dawud said the demonstrators intended to head for the UN refugee agency's Tel Aviv office and foreign embassies in the city in further rallies on Monday.

Many illegal immigrants, who are often employed in menial jobs in restaurants and hotels, also launched a three-day strike in several Israeli cities on Sunday.

Under legislation passed on December 10, authorities can detain illegal immigrants entering Israel for up to a year without trial.

The same month a sprawling detention facility named "Holot" or "Sands" opened in southern Israel's Negev desert to house illegals crossing the nearby Egyptian border and for immigrants already in the country deemed to have disturbed public order.

The moves triggered protest marches by migrants, including inmates who are allowed out during the day but locked in at night, but Sunday's was the largest demonstration by far.

Israel says that there are close to 60,000 illegal immigrants from Africa in the country and that they pose a threat to the state's Jewish character.

Along with arrests and deportations, Israel has also built a high-tech fence along the border with Egypt's barren Sinai, the main point of clandestine entry.

Many migrants live in poor southern neighbourhoods of Tel Aviv where violent race riots erupted in 2012.

Anti-migrant protesters there were addressed by MPs from Prime Minister Benjamin Netanyahu's Likud party, including hardliner Miri Regev, who at the time called the Africans "a cancer in our body".