Romania, a NATO member and host to a missile defense facility built by the United States, has been thrown into political disarray by the surprise victory of a little-known ultranationalist in the first round of a presidential election held this weekend.

With nearly all ballots counted, official results released early Monday gave the most votes to Calin Georgescu, a dark-horse candidate without a party who had been widely dismissed as a fringe extremist. Mr. Georgescu has denounced Ukraine, NATO and the European Union, and has often sided with Russia, and he has praised Romania’s fascist leader during World War II.

Despite leading, however, Mr. Georgescu took only 22.9 percent of the vote on Sunday, which is far short of the majority needed to win outright. He will therefore compete in a runoff on Dec. 8 against the second-place finisher — likely to be Elena Lasconi, a liberal.

The results have roiled Romanian politics just a week before a parliamentary election that will set the shape of the next government.

Romania’s president has limited powers, but they include a big say in military spending and foreign policy. Romania has been a firm supporter of Ukraine and has played a major role in strengthening NATO’s eastern flank. A new alliance air base near Mihai Kogalniceaunu, a village near the Black Sea, will be one of NATO’s biggest in Europe.