Magistrates seeking to search President Jacques Chirac's Elysee Palace office have been turned away by French police.
The French authorities believe Bernard Borrel may have been murdered
The search was part of inquiries into the 1995 death of a French magistrate in the east African state of Djibouti.
A presidential spokesman said entry was refused in line with the constitutional immunity of the head of state.
Investigators last month searched the justice and the foreign ministries for evidence France may have blocked the inquiry into Bernard Borrel's death.
The attempted search occurred as President Chirac was ending his last cabinet meeting before the second round of the election to choose his successor.
Two magistrates arrived at the Elysee Palace with police officers hoping to search the African affairs department.
When they were refused entry by gendarmes, they asked the Paris military governor to intervene, but he is said to have been powerless to do so.
A magistrates' union has condemned the refusal, arguing the inquiry was targeting the Elysee's offices, not the president himself.
The attempted search of the Elysee Palace was the first since the Fifth Republic began in 1958, according to Reuters news agency.
In April the magistrates seized documents from the French foreign and justice ministries.
The French authorities believe Mr Borrel may have been murdered and have issued arrest warrants against the Djibouti state prosecutor and the head of the country's secret services.
Djibouti authorities initially said Borrel, who had been working as a consultant to the country's justice ministry, had committed suicide, but his widow has accused high-ranking local officials of involvement in his murder.
Djibouti is home to France's largest military base in Africa.