PARIS — Former President Nicolas Sarkozy of France has been ordered to stand trial on charges of corruption and influence-peddling in connection with accusations that he tried to illegally obtain confidential information from a magistrate several years ago, a French judicial official said Thursday.

It was another legal blow for Mr. Sarkozy, who served from 2007 to 2012 and has stayed in the background of French politics even amid the recurring headlines of his judicial entanglements. He has already been ordered to stand trial in another case, involving the financing of his 2012 campaign.

Mr. Sarkozy, one of his lawyers and a former magistrate have all been ordered to stand trial on charges of active corruption and influence-peddling, the judicial official said.

The national financial prosecutor’s office had requested in October that they stand trial, but the magistrates investigating the case made their decision on the request only this week. In France, complex criminal cases are handled by special magistrates with broad investigative powers.