PARIS — France's highest court on Wednesday granted President Jacques Chirac broad immunity from prosecution while in office, thwarting efforts to call him as a witness in an investigation into alleged corruption at Paris City Hall while he was mayor.

The ruling is a major victory for Chirac, whose public approval rating rose following his outspoken support for the international fight against terrorism in response to the Sept. 11 attacks in the United States.

Chirac, a conservative, is expected to face Socialist Prime Minister Lionel Jospin in presidential elections next year.

The issue of whether a sitting president has immunity has been debated for years. Wednesday's ruling by the Court of Cassation set an important precedent and prevents Chirac from being dragged into a criminal investigation as a potential defendant.

"The president cannot, throughout the duration of his term, be heard as a witness, nor can he be investigated, cited or sent before a court in any infraction before a criminal jurisdiction," the court said in its opinion.

Investigators had sought to question Chirac in several corruption scandals.

The court ruled that Chirac may be called to testify following his term as president — a decision that lawyers for civil parties connected to the investigation called ineffective.

The court went along with the opinion of the state prosecutor, Regis de Gouttes, who argued last Friday at a hearing that Chirac has immunity from prosecution as a sitting head of state.

De Gouttes had argued that France's constitution is vague on questions of presidential immunity, and he urged the court to "enrich and clarify the explanation."

Friday's hearing was an appeal of a lower court decision that said Chirac could not be called to testify.

The ruling will also have implications for lawmakers, who enjoy parliamentary immunity.

Authorities are investigating allegations of wrongdoing at the Paris printer's office during Chirac's term as mayor from 1977 to 1995.

Paris prosecutors opened a formal investigation in 1997 into allegations of favoritism and misappropriation of public money at City Hall's printing company SEMPAP.

SEMPAP was set up in 1986 and was dissolved in 1996 by Chirac's successor, Jean Tiberi. As mayor, Chirac was warned on three occasions by financial comptrollers that the printing company was losing money. When it was liquidated, SEMPAP had a loss of $258,200.