BERLIN — A close ally of Chancellor Angela Merkel was ousted Tuesday as head of her conservative bloc’s parliamentary group, a surprise defeat that dealt a blow to the longtime German leader’s authority in her own ranks.

Volker Kauder, who had led the parliamentary group of Merkel’s Union bloc since she became chancellor in 2005, was defeated by Ralph Brinkhaus — a budget policy expert who had been one of his deputies.

The vote followed a wobbly start to Merkel’s fourth government, a coalition of the Union and the center-left Social Democrats that has squabbled persistently since it took office in March. It came a year after the conservatives lost significant support in an election that saw the far-right Alternative for Germany enter Parliament.

Mr. Kauder had been widely expected to prevail in Tuesday’s vote of lawmakers from Merkel’s Christian Democratic Union and its Bavaria-only sister party, the Christian Social Union. But he was defeated 125 to 112 margin, with two abstentions.