Not afraid to fight: French Mirage 200D fighter planes en route from a base in Chad to carry out strikes in Northern Mali on Sunday. Photo: EPA

French President François Hollande just decided to overrule all the skeptics in Paris and abroad, end-run the United Nations and draw a line in the Sahara sands.

Months ago, a band of cruel, ruthless and decisively anti-Western Islamist terrorists took over a large swath of northern Mali. And then, in recent weeks, they started to advance south toward the capital, Bamako.

The government army was clearly no match for the al Qaeda-affiliated rebels; the Islamists were betting that Western war weariness would prevent any meaningful outside intervention.

Surprise!

Hollande was concerned for the lives of French citizens and other Westerners living in Mali, and worried that the rebels would turn the country into an anti-Western terror base, à la pre-9/11 Afghanistan.

So on Friday he picked a plan off the French military’s shelf and in a matter of hours launched a massive air attack that completely destroyed key terrorist bases in Mali’s north while a handful of French troops worked with Malian loyalist forces to block the rebels’ advance.

Hollande’s Mali blitz is ongoing and could suffer setbacks. Yesterday, rebels managed to retake some land from the government.

And, in customary bluster, the Islamists threatened to “open the gates of hell,” raising fears of a terror wave (aided by some French citizens of North African descent) hitting France.

But Hollande isn’t backing down. He’s resolute in maintaining a massive air and land campaign that French officials say will last “weeks” to help Mali repel the Islamists.

This follows a humiliating failure of US counterterrorism efforts in Mali.

The Obama administration was on the job in Mali — sort of. It ruled out drone assassinations of leaders, our most effective anti-terror tool: Between Afghanistan, Yemen and elsewhere, the US flying killer robots were already spread too thin. Instead, a handful of US spooks were training would-be Malian military commanders to lead the good anti-terrorist fight.

Oops: As a Malian source told The New York Times, that strategy was a “disaster.” As other sources have now confirmed, the men that America trained and equipped proceeded to switch sides — they’re now leading the charge for the Islamists.

The UN Security Council was also in motion — slow motion. It planned to deploy an adequate-size force, mostly of Western-trained troops from Mali and neighboring countries — forces it hoped would be ready for combat by September, at the end of the rainy season (which makes fighting in Mali all but impossible).

But the rebels clearly weren’t waiting, moving on Bamako in the weeks left before the start of that season. By the time UN forces moved in, the Islamists likely would’ve already won.

The French did talk to the Security Council — yesterday, days after Hollande moved. They explained that their action was justified by a request for help from the Malian government. UN diplomats now say they’ll try to update the council’s strategy to fit the “new reality” that France has created.

Britain, meanwhile, announced it would support the Mali operation with its own air assets. Obama, presumably, will soon lead from behind the Brits in following France’s lead.

Hand it to Hollande, a Socialist elected just last year: He’d just suffered a defeat in Somalia, where last week’s military attempt to rescue a French hostage failed. At home, he faces huge resistance to a plan to approve gay marriage — while movie star Gerard Depardieu just denounced his French citizenship to show disdain for Hollande’s new taxes on “millionaires and billionaires.”

Hollande ignored all that, and also disregarded warnings from Parisian war-weary skeptics and cautious US strategists.

Andhe didn’t bother trying for explicit UN approval of military action. Funny: A decade ago, the French were denouncing the Americans as unilateralist for doing the same on Iraq. Hollande apparently didn’t worry that some might declare his actions an international scandale.

In other words, like Capt. Louie Renault in “Casablanca,” he dropped the old French ways — turning instead into a responsible Western leader, fighting the good fight against Islamist nihilists.

If only President Obama could similarly become a Rick Blaine, this could be the beginning of a beautiful friendship.