Something as small as a sound defeat in the French presidential elections wasn’t going to stop Marine Le Pen from enjoying a bit of a boogie.

Despite taking roughly 34 percent of the vote to pro-European centrist Emmanuel Macron’s 66 percent, the 48-year-old former leader of France’s far-right National Front party (FN) still danced the night away to party tunes like “YMCA” by The Village People and “I Love Rock ‘N’ Roll” by Joan Jett and The Blackhearts.

This bizarre video shows Le Pen, the daughter of party founder and Holocaust denier Jean-Marie Le Pen, hitting the dance floor just hours after her defeat.

Growing resentment at the EU and fears over immigration saw her soar in the polls, but she lost to pro-European centrist Macron in the final duel for the French presidency.

After FN surprisingly topped the polls in the 2016 European elections, Le Pen hoped to be elected her country’s first female — and far-right — president.

But Macron remained the favorite, with polls after their final debate showing 63 percent of people found Macron the more convincing versus 34 percent for Le Pen.

The polls were correct, and Macron won way in excess of the 50 percent required in the final round of an election that has left France bitterly divided.

Had she won, she says she would have immediately worked to pull France out of the European Union and NATO and put francs — and not the euro — back in the pockets of the French.

She pledged to toughen laws to combat illegal immigration and terrorism and ensure that the French come first in jobs and benefits.

Le Pen has now pledged to “profoundly renew” the FN, so as “to meet the expectations of the French people.”

Macron is particularly opposed to the FN, which has always been associated with nostalgia for the Third Reich, racism, anti-Semitism and hatred of Islam.

But at a rally by the Louvre, he told the crowds: “I understand the divisions of our country that have led some to vote for extremists.

“I understand the anger, the anxiety, the doubts that a great part among us have also expressed.”