PRAGUE — An anti-establishment party founded by a billionaire oligarch overpowered the Czech Republic’s longstanding mainstream parties on Saturday, making the blunt-talking, enigmatic tycoon almost certain to become prime minister in a coalition government.

Ano, the party formed by Andrej Babis, 63, had nearly 30 percent of the vote with 99 percent of ballots counted. The Social Democrats, who have been at the center of Czech politics for a quarter-century and had finished first in the previous election, came in a distant sixth with just 7 percent. The Communists were fifth. And the Christian Democrats, another party that traces its roots to the country’s founding, got less than 6 percent, perilously close to the cutoff to qualify for seats in Parliament.

Ano was not the only anti-establishment party to do well. The extreme right-wing Freedom & Direct Democracy, with 10.7 percent, doubled its proportion from the previous election. That was just a fraction of a percentage point behind the youth-oriented Czech Pirate Party, an anti-establishment movement from the opposite end of the political spectrum.

In the previous parliamentary election, in 2013, Mr. Babis stunned the political establishment by drawing the second-highest number of votes, just one year after founding his party. That was enough to make Ano part of the ruling coalition with the Social Democrats and the smaller Christian Democrats, with Mr. Babis its finance minister. He was able to maintain his anti-establishment credentials by focusing on corruption and economic reforms.