ROME -- Italy's parliament backed Premier Silvio Berlusconi on Thursday, rebuffing a request by prosecutors to search some of his properties as part of a prostitution investigation targeting him.

In a much-needed victory for the embattled leader, parliament rejected the prosecution requests in a 315-298 vote that came after a four-hour debate in the lower house. They sent the case back to the prosecutors, challenging their jurisdiction. The premier has denied wrongdoing.

Milan prosecutors allege that Berlusconi paid for sex with a minor and then used his office to cover it up. They wanted to search the offices of a Berlusconi accountant, Giuseppe Spinelli, who allegedly handled payments on behalf of the premier to the minor as well as other payments to a number of young women who attended parties at his villas.

The vote will likely have limited impact on the investigation. Magistrates are planning to go ahead with their probe and are expected to issue a request to indict Berlusconi as early as next week.

But Thursday's vote was a significant victory in a test of Berlusconi's grip on parliament. The premier's once comfortable parliamentary majority became shaky after he fell out with an ally last year, and he barely survived a pair of confidence votes in December.

"The vote assures the majority that it still has the numbers to go ahead, however narrowly," said Francesco Verderami, a political analyst for Corriere della Sera.

"As far as the judicial battle is concerned, nothing changes," he said. "Politically it is step forward for Berlusconi."

Making the vote even more sensitive, Berlusconi had already suffered a setback earlier Thursday when a parliamentary commission deadlocked a government plan to grant Italy's towns and cities a greater role in taxation. Enacting the measure is the top priority of the Northern League, a crucial Berlusconi ally, and any delay or failure to pass the measure might affect the government's stability.

But Northern League leader Umberto Bossi signaled his party was still by Berlusconi's side, in a significant comment late Thursday.

"For now we go ahead," Bossi said. "Numbers are good," he added, in reference to the vote linked to the sex scandal.

Berlusconi, 74, has rejected calls for his resignation in the wake of the scandal, which has come to be known in Italy as "Ruby-gate," in reference to the nickname of the Moroccan teenager at the center of the probe. The scandal has proven an embarrassment for Italy, with newspapers describing parties at Berlusconi's villas as bacchanalia with topless girls dancing around.

"You are hurting Italy, and the only thing you can do for the good of your country now is resigning," Dario Franceschini, of the opposition Democratic Party, told Berlusconi.

Prosecutors allege Berlusconi paid for sex with Ruby last year, when she was 17, and then abused his power when he called a police official in May to get the girl out of police custody. She was being held for an unrelated theft.

Berlusconi's lawyers and political allies say the Milan prosecutors do not have jurisdiction in the case. They maintain the competent body is the Tribunal of Ministers, a three-member special tribunal set up to deal with alleged offenses committed by public officials in the execution of their duties.

Berlusconi's supporters do not deny the premier called the Milan police, but insist he did so to avoid a diplomatic crisis with Egypt since he thought the girl was a relative of Egyptian President Hosni Mubarak.

"Berlusconi did call, that's true. But he did so in the belief, right or wrong, that (Ruby) was a relative of a head of government," Maurizio Paniz, a lawmaker in Berlusconi's party, told the house during the debate. "You know as well as I do that international relations are safeguarded by way of phone calls like that, too."

Berlusconi has said he intervened to help Ruby out of the goodness of his heart.

Berlusconi and Ruby, who in the meantime has turned 18, have denied having a sexual relationship. Berlusconi, who was elected in 2008, has accused prosecutors of being politically motivated and intent on driving him out of office. He maintains his parties are elegant and dignified.

Ruby said in a recent interview on Italian TV that when she first met Berlusconi she gave her age as 24 and said she was Egyptian.