European lawmakers voted by a wide margin on Wednesday to begin a punishment procedure against Hungary for potentially breaching democratic norms, a measure never previously initiated by the European Parliament.

The vote was only the first step toward potential sanctions. The leaders of the European Union’s 28 member states must ultimately decide if the government of Prime Minister Viktor Orban is at fault, and whether it should be punished.

But it was nevertheless a meaningful moment in contemporary European politics, because it showed Mr. Orban — for years sheltered by Europe’s center-right leaders, even as he undermined the rule of law in Hungary, criticized European institutions, and became a hero of the far right — losing the support of most of his allies in the European mainstream.

The measure passed 448-197, narrowly meeting a two-thirds threshold needed to validate it, after a majority of Mr. Orban’s conservative alliance broke with him.