ROME — Not long ago, the Five Star movement looked like the power to be reckoned with in Italian politics. The internet-based party stormed the political establishment last year to become the dominant force in Italy’s government.

But since then, Five Star’s support has cratered, as Matteo Salvini, leader of its nominally junior coalition partner, the hard-right League, dominates Italian politics through sheer force of personality, ceaseless campaigning and a news-driving social media presence deeply in tune with the country’s anti-migrant pulse.

The results this week from European Parliament elections confirmed the trends, with Mr. Salvini’s party finishing first, taking more than a third of the vote, to Five Star’s 17 percent, third-place showing behind the progressive Democratic Party it had mocked as dead and irrelevant.

Things have gotten so bad for Five Star that on Thursday, its political leader, Luigi Di Maio, put his dream job on the line — or online — and asked party members to continue to back him in a closed vote on the party’s internal web platform, which they did.