ROME — The nationalist leader Matteo Salvini suffered a setback in his campaign to trigger the collapse of Italy’s government and set the stage for a return to power when his party’s candidate came up significantly short in a regional election on Sunday that he had framed as a bellwether of his national appeal.

Mr. Salvini, the leader of the anti-migrant League party, had seized on the contest in the northern region of Emilia-Romagna, which has a deep tradition of voting for communist and leftist parties. It was for him an opportunity to show his national dominance and to make the case that the wobbly coalition government of the Democratic Party and the anti-establishment Five Star Movement no longer represented the people and that he did.

Instead, the left’s stronghold held, and Mr. Salvini was effectively repulsed.

“Today Matteo Salvini has lost the election,” Nicola Zingaretti, leader of the Democratic Party, said after early results made clear the victory of his party’s candidate, the region’s incumbent. Until the very end, Mr. Zingaretti said, Mr. Salvini campaigned “to topple the government,” but the government has “come out stronger.”

The usually confident Mr. Salvini sounded remarkably low key in a late-night news conference, calling himself proud of his party’s performance and insisting he would work “twice as hard” going forward.