The handwriting is on the wall for one of France's most celebrated folk heroes: the lonely investigating magistrate.

Feted by the movies and glamorized in countless detective stories, the investigating magistrates have come under public criticism recently because of a series of sensational judicial blunders. Last week, the Socialist government announced plans to reform an institution that was founded by the emperor Napoleon in 1810.

The changes, which will reduce the solitary decision-making power of a figure frequently described as "the most powerful man in France," could have an impact on other European countries whose justice systems are based on the Napoleonic code rather than the Anglo-Saxon tradition of common law.

The unique authority of France's corps of 522 investigating magistrates derives from the fact that they combine the roles of policeman and grand jury in the American system. Working in solitude under strict rules of judicial secrecy, they are responsible both for supervising a police investigation into a crime and deciding whether a suspect should be sent to trial.

If the cases they are working on capture the public imagination, the petits juges (little judges) can end up as national or even international celebrities.

One thinks of Christos Sartzetakis, now president of Greece after being immortalized in Costas-Gavras' film "Z" for his investigation of the murder of a leftist deputy in 1961, or Italy's Ilario Martella, who looked into allegations of a "Bulgarian connection" to the attempted assassination of Pope John Paul II in 1981.

The strength of the French system, as copied elsewhere in Europe, is the independent magistrate who fearlessly presses ahead with his investigation, oblivious to political pressure. The weakness is that important legal cases can hinge on the personality of a lone investigator, who has the power to detain suspects for lengthy periods on fairly flimsy evidence provided he himself is "intimately convinced" of their guilt.

The potential for human error was underlined recently by France's tortuous "Gregory Affair" -- a legal saga which appears to have played a decisive role in convincing the justice minister, Robert Badinter, that reforms are overdue. Public opinion has been aroused by the blunders of a young and inexperienced magistrate investigating the murder of a 4-year-old boy, Gregory Villemin.

The 33-year-old magistrate, Jean-Michel Lambert, initially suspected the boy's uncle of the murder. The uncle was arrested, held for three months, and then freed when the evidence against him was found to be faulty. A month after his release, he was shot dead by Gregory's father.

After belatedly deciding that the uncle was innocent, Judge Lambert next arrested Gregory's pregnant mother on the same murder charge. The mother promptly went on a hunger strike. She has been released now herself on the order of an appeals court and the investigation suspended while she has her baby.

The Badinter proposals, which are to be submitted to parliament later this year, are designed to reduce the likelihood of such blunders by ending the present isolation of the investigating magistrate. Instead of working by himself, in future he would be part of a team of three judges that would take joint responsibility for all decisions involving the arrest or release of suspects.

Announcing the change in an article in the Paris daily Le Monde, Badinter described the traditional solitude of the investigating magistrate as "an anachronism" in an age when other legal experts including defense lawyers worked in teams. He also criticized the lack of a clear distinction between the role of a "Maigret" and a "Solomon."

Under the new system, which cannot be introduced before 1988 because of the need to recruit 150 extra magistrates, individual judges still would be assigned to lead police investigations. But information about a case would be available to all members of the "investigating chamber" and young magistrates like Lambert would be closely supervised by a senior judge.

The justice minister argued that the principle of shared responsibility would help protect magistrates from assassination. During the past decade, two French judges have been murdered by criminal gangs on the assumption that this would be a fatal blow to the investigation.

In Italy, where judges have been a prime target of both the Mafia and political terrorists, investigating magistrates already have begun to work in teams on difficult cases.

The proposed changes have been generally welcomed by French lawyers who feel the present system is weighted against the accused. But it was criticized by individual investigating magistrates, who argued that what they really need is improved working conditions and more efficient secretarial support.

"This reform will paralyze the system of investigation and be a source of conflicts between magistrates to the benefit of the defense," said Jean-Louis Debre, a prominent investigating magistrate in Paris.

The need for an investigative magistrate to persuade two colleagues that a suspect should be held in preventive detention should ease the strain on French prisons. At present, half of France's prison population is awaiting trial -- compared with roughly 21 percent in Britain and 17 percent in Sweden.

Italy holds the European record for the numbers of prisoners in preventive detention: 64.1 percent.