Israeli prime minister Benjamin Netanyahu has blocked a controversial plan to ban Palestinian workers from riding the same bus lines as Israelis, hours after it was approved by Defence Minister Moshe Yaalon.

Netanyahu ordered the suspension of the plan after it was condemned by opposition leaders and Palestinians, with some likening it to the apartheid system in South Africa.

Under Yaalon's plan, Palestinians would have to return from Israel to the occupied West Bank via the same checkpoint they departed from. They would not be allowed to ride Israeli bus lines.

A defence ministry official said that, under the three-month project, hundreds of Palestinian workers who travel each day to work in Israel from the occupied West Bank would have to change buses to avoid vehicles carrying Israelis.

Israel's settlers have long campaigned for a ban on Palestinians using the same public transport as them, citing security concerns. Israeli public radio quoted Yaalon as saying that the ban would allow "better control of the Palestinians and those leaving Israel and reduce security risks".

Palestinian workers who enter Israel via the Rayhan, Hala, Eliyahu and Eyal checkpoints would be forced to return their homes via the same checkpoints. Haaretz newspaper reported that many Palestinians who crossed into Israel through Eyal checkpoint would no longer be able to return to their homes on common buses with the Israelis through Israel's Route 5 to the West Bank.

If the plans are eventually enacted, the new commute could take two hours longer than before.

Yaalon said back in October that "you don't need to be a security expert to realize that 20 Arabs on a bus with a Jewish driver and two or three passengers and one soldier with a gun is a set-up for an attack".

When the plans were first discussed last year, former cabinet minister Tzipi Livni said "this is apartheid" and described the plans as "discrimination that's forbidden by Israeli law."

Israel's opposition leader, Isaac Herzog, has also condemned the project, writing on his Facebook page:

"The decision to separate Palestinians and Jews on public transportation is an unnecessary humiliation that is a stain on the state and its citizens.

"This is another one of the prime minister's mistakes, who is giving in to and supporting a horrible decision that has no connection to the security of the state,"

Zehava Galon, leader of the left-wing Meretz party said: "This is how Apartheid looks".