Rupert Murdoch will today face the humiliation of the Commons issuing a unanimous all-party call for his scandal-ridden News Corporation to withdraw its £8bn bid for BSkyB, the great commercial prize he has been pursuing to cement his dominance of the British media landscape.

In an extraordinary volte-face, David Cameron will disown the media tycoon by leading his party through the lobbies to urge him to drop the bid. Murdoch can defy parliament and press ahead with the bid, prompting a Competition Commission inquiry, but he risks finding himself ostracised by a political class that once scrambled to bend to his wishes.

Cameron will also announce today that a judge is to oversee a full-blown inquiry into phone hacking, and that a panel will examine the future regulation of the media. The judge – who will be named today – will lead the main inquiry into the hacking allegations, which is expected to be modelled on the Hutton inquiry into the death of Dr David Kelly in 2003.

It is understood that the inquiry will also examine the relationships between police and the press, and politicians and the press. The inquiry will not sit in public until the criminal investigation has completed its course.

Yesterday, in the latest of a series of strategic coups that has left Downing Street looking flat-footed, Labour leader Ed Miliband tabled a Commons motion for debate urging News Corporation to withdraw the bid "in the public interest".

With the Liberal Democrats certain to back Labour's simple motion, the prime minister took the rare and possibly legally questionable step of rowing in behind the opposition, even though only the day before Downing Street insisted he and the culture secretary, Jeremy Hunt, must remain impartial on the takeover.

Miliband will lead the debate and will argue that the bid has to be withdrawn at least until police and judicial investigations into phone hacking and police bribery at News International have been completed. That could be in 2014.

Cameron's spokesman said it was for News Corp to decide how to respond to the vote, but added: "We would always expect people to take seriously what parliament says."

A spokesman for the deputy prime minister, Nick Clegg, said the vote represents "an extraordinary unified statement of the will of the people. It is unimaginable that any public corporation or public figure will want to ignore such a strong statement by the legislature of this country."

Clegg first called for Murdoch to withdraw the bid on Monday, when Cameron had also said he thought Murdoch's priority should be to sort out malpractices in his company rather than trying to clinch what could eventually be a takeover costing roughly $15bn (£9.4bn).

First indications suggested the News Corp chairman will ignore the vote in parliament, and will turn down an invitation to give evidence to the culture select committee next Tuesday. James Murdoch and Rebekah Brooks have also been asked to attend. The pressure remains on other News Corp executives, with Murdoch's closest adviser Les Hinton flying into the UK yesterday.

In London, BSkyB's shares fell another 3% to 692p because investors fear that Murdoch's bid could be delayed indefinitely or scrapped altogether.

News Corp, which owns 39% of BSkyB, is determined to keep the lucrative bid alive, and on Monday withdrew its proposal to spin off Sky News as a financially and editorially independent unit. The move effectively forced Hunt to refer the bid to the Competition Commission. The switch in tactics gave Murdoch the chance to capture BSkyB before a police investigation or judicial inquiry had been completed. A Competition Commission inquiry can only last six months, with a possible three-month extension, before a recommendation is referred to Hunt. Hunt will abstain in the vote in an effort to preserve his political impartiality over the bid.

Privately, Downing Street is frustrated at the way Miliband has shaped the political agenda in the past week, and Cameron is hoping to regain the initiative today when he sets out the terms of reference of the inquiry into the crisis.

The prime minister held discussions yesterday with John Whittingdale, the chairman of the culture select committee, and Keith Vaz, the chairman of the home affairs select committee. Vaz's committee criticised John Yates, the assistant commissioner of the Metropolitan police, on Tuesday for his handling of the investigation into phone hacking.

Cameron is also expected to announce plans to strengthen transparency rules over meetings between ministers and media figures, including for the first time private social meetings. Until now, ministers have declined to publish details of meetings with senior media figures, bar those that are defined as business meetings.

Ministers are also looking at new rules designed to oversee the future employment of former senior police officers. Andy Hayman, the Met's assistant commissioner in charge of the investigation into News International in 2005-6, ended up working for them.

The judicial inquiry is also likely to look at why the last Labour government failed to launch an inquiry into phone hacking at News International. Supporters of Gordon Brown are furious that the cabinet secretary, Sir Gus O'Donnell, objected to Brown's private call for a judicial inquiry in 2010. Labour backbencher Chris Bryant tabled a question asking Cameron "to publish the advice provided by the then cabinet secretary in early 2010 to the then prime minister on the case for a statutory public inquiry into the phone-hacking scandal".

The debate will see an intense political battle between the Conservatives and Labour over which party did least to distance themselves from the Murdoch group. The Lib Dems will relish reminding the public that they shunned Murdoch; three of its most senior figures outside government wrote to Murdoch to accuse him of tainted journalism.

The party's deputy leader, Simon Hughes, wrote: "People working for your company have sought to cover up the many wrongs it has committed. Your company has been accused of lying to the Press Complaints Commission by its chair. Only yesterday the police accused News International of trying to undermine the ongoing police investigation into the affair. News International is simply no longer respected in this country.

"Given the history of the last six or more years, it should be of little surprise to you that many people in this country have no desire to have any more of our media fall into your hands, tainted as News International is by a history of completely unacceptable journalistic practices."