BUCHAREST, Romania (AP) — Military planes and helicopters flew over the Romanian capital Thursday as thousands turned out to celebrate the date when the country reunified with Transylvania in 1918.

President Klaus Iohannis used the occasion of National Day, which came just before Romania's Dec. 11 parliamentary elections, to warn against the populist path being offered in some countries.

"It is essential that we firmly reject the anti-European, xenophobic discourse, and maintain people's confidence in ...Western values so that they remain our main goals," Iohannis told officials who gathered for an evening reception at the 17th-century Cotroceni presidential palace.

Iohannis noted that Romania's path from a communist dictatorship toward democracy "may appear irreversible.... but we can easily see how extremist and populist rhetoric has become all too present in much older and more consolidated democracies than Romania's."

The president and Prime Minister Dacian Ciolos were among senior officials who watched a military parade in Bucharest Thursday morning. Some politicians were absent from the main stage after Iohannis said he would not invite to the celebrations those who are being investigated for wrongdoing.

Senate speaker Calin Popescu Tariceanu, charged with making false statements to protect people in a real estate case, and Social Democratic Party chairman Liviu Dragnea, who was handed a two-year suspended prison sentence this year for voting fraud, stood in the crowd watching the parade.

The streets of the normally busy capital of 3 million were almost deserted on a sunny but cold day. Soldiers paraded in military vehicles. There were also celebrations and parades in other cities.

In a sign of neighborly tensions, Hungarian Foreign Minister Peter Szijjarto told Hungarian diplomats not to attend the celebrations.

Transylvania was formerly part of the Austro-Hungarian empire, and 1.4 million ethnic Hungarians who mainly live in Transylvania are seeking greater autonomy.