Carles Puigdemont, the ousted and self-exiled separatist leader of Catalonia and the bête noire of the Spanish government, announced on Thursday that he was giving up his campaign to be reappointed as the region’s president.

By turns frustrating, enigmatic, unpredictable and combative, Mr. Puigdemont had become the embodiment of Catalonia’s aspirations for independence after leading a thwarted effort to secede from Spain.

He and his cohorts declared independence last fall, prompting the central government in Madrid to suspend their government, pursue them for sedition, and call new elections for the region, in hopes of a political reshuffle in its favor.

Mr. Puigdemont fled into exile in Brussels, where he successfully campaigned for re-election, to the chagrin of Spain’s prime minister, Mariano Rajoy.