But Mr. Sarkozy is the first former president in the country’s history to be detained and questioned in police custody.

Mr. Sarkozy also appears to be the first former president whose private conversations were monitored by investigators. The case has spurred lurid headlines and called into question whether the tapping of Mr. Herzog’s phone was a breach of attorney-client privilege.

The latest twist in the case could be devastating for Mr. Sarkozy’s hopes of a political comeback. And while the scandal has been damaging for Mr. Sarkozy and the right, it has also proved embarrassing for President François Hollande’s Socialist government, which initially sought to distance itself from the decision to turn to phone-tapping in the case. Government ministers, including the justice minister, Christiane Taubira, later acknowledged that they were informed of the phone-tapping as early as February of this year.

The developments came at a time of upheaval in French politics, with the left and the right reeling from their own problems and the far-right National Front celebrating a strong showing in this spring’s European parliamentary elections. Mr. Hollande’s government is weighed down by a sluggish economy, ideological dissension in its ranks and Mr. Hollande’s record-low approval ratings. Mr. Sarkozy’s conservative party is in disarray as well, suffering from a number of scandals and the lack of a clear leader.

On Tuesday, some of Mr. Sarkozy’s supporters lashed out against what they termed the humiliating detention of a former president and accused the Socialist government of pushing the case in a bid to upend Mr. Sarkozy’s political ambitions. Jean-François Copé, former leader of Mr. Sarkozy’s party, the Union for a Popular Movement, wrote on Twitter that Mr. Sarkozy was the victim of a “hate campaign.”

Among the accusations against Mr. Sarkozy is that in 2007 his presidential campaign received up to €50 million, or about $68 million, in illegal funds from Col. Muammar el-Qaddafi, the Libyan leader.

Mr. Sarkozy has consistently denied any allegations of impropriety, and compared those who tapped his phones to the Stasi, the secret police in East Germany. He has said he received no financial support from Libya and has insisted that the accusations — made by former allies of Colonel Qaddafi and his sons — are politically motivated and derive from his role in orchestrating the international military intervention in Libya in 2011 that ultimately led to Colonel Qaddafi’s ouster.