Italian MPs have voted to challenge the legitimacy of Silvio Berlusconi's vice trial, ahead of the start of proceedings on Wednesday in which the prime minister is accused of paying an underage prostitute and then abusing his position to cover up his alleged offence.

The vote in the lower house of the Italian parliament sets up a constitutional face-off between the legislature and the judiciary that could lead to the case being derailed.

The Chamber of Deputies, which is controlled by Berlusconi's conservative allies, ruled in February that the trial should have been diverted to a special court — one in which he would have been more likely to be acquitted. Lawyers will appeal on parliament's behalf to the constitutional court, which could rule that the case be scrapped.

Dario Franceschini, the parliamentary leader of Italy's biggest opposition group, the Democratic party, said the outcome had written a "truly disgraceful page" in the history of parliament. But Berlusconi's supporters were jubilant.

The vote came as demonstrations against the prime minister were being staged on Tuesday night in both Rome and Milan. Earlier, wiretap transcripts were published indicating that Berlusconi had planned to make his alleged "madam" a member of the national parliament.

One of the transcripts is a conversation said to be between him and Nicole Minetti, an Anglo-Italian former showgirl who emerged from obscurity as a dental hygienist to become a member of the Lombard regional assembly representing Berlusconi's party. She is currently under investigation along with two other people on suspicion of aiding and abetting prostitution, including juvenile prostitution.

Documents sent to parliament by the prosecutors earlier this year suggested that the three procured a stream of young women for dinners at Berlusconi's mansion near Milan followed by so-called "bunga bunga" sessions. According to the prosecutors, the women – some masked, others wearing police officers' or nurses' uniforms – performed erotic dances, at the end of which Berlusconi chose "one or more" with whom to spend the night.

According to the Italian daily Corriere della Sera, last August Berlusconi was recorded by police as telling Minetti: "Everyone is speaking so well of you, darling. Everyone. The [Northern] League people. Our people … so then, when there are elections, you'll come into parliament."

Publication of the wiretaps is bound to prompt a storm of protest from Berlusconi's followers, one of whom has tabled a bill to prevent transcripts being included in court papers. Even under present legislation, however, conversations involving a member of parliament ought not to have been inserted in the prosecution's submission, which becomes publicly accessible once an inquiry is closed.

Berlusconi denies all wrongdoing.