His fidelity and address while serving under Desaix, who was killed at Marengo, secured him the confidence of Napoleon Bonaparte, who appointed him to command the special body of gendarmes charged with the duty of guarding the First Consul.