In 1839 Lesseps was appointed consul at Rotterdam, and in the following year transferred to Málaga, the ancestral home of his mother's family. In 1842 he was sent to Barcelona, and soon afterwards promoted to the grade of consul general. In the course of a bloody insurrection in Catalonia, which ended in the bombardment of Barcelona, de Lesseps offered protection to a number of men threatened by the fighting regardless of their factional sympathies or nationalities. From 1848 to 1849 he was minister of France at Madrid.