A courageous Danish beauty who fought ISIS terrorists has been jailed while jihadis returning from the Middle East walk free.

The decision by the Danish government to cage Joanna Palani, 23, who fought alongside the Kurdish peshmerga in Iraq and then the YPG militia in Syria, has triggered outrage in the European nation.

More troubling: ISIS has put a US$1 million bounty on her head, according to reports.

In a case of political correctness gone mad, the Iraq-born Dane was stripped of her passport and given a 12-month travel ban so she wouldn’t return to the battle zone.

“It’s a shame. We are the first country in the world to punish a person who has been fighting on the same side as the international coalition,” her lawyer, Erbil Kaya, told the Guardian.

“It’s hypocritical to punish her. Why don’t we punish the people who fight for ISIS instead of people who are fighting on the same side as Denmark? I don’t think it makes sense.”

When the daring Dane told officials she had travelled to Qatar, she was taken into custody and locked away in a Copenhagen penitentiary.

As for returning jihadis, Denmark has practically rolled out the red carpet welcoming the death cult’s members home.

A tidal wave of wannabe terrorists has flooded the Middle East. In fact, Denmark is second only to Belgium in per capita representation among ISIS ranks.

Denmark is now blocking passports for citizens it deems “a substantial threat to public order,” the U.K. Sun reports.

But for jihadists, Denmark supports a “deracializing” policy where the jihadis are given government jobs and counselling.

Palani feels betrayed.

She told the Guardian she went to the killing zones “to fight for women’s rights, for democracy – for the European values I learned as a Danish girl.”

And when she returned home, she faced fury from the government -- and death threats from homegrown extremists.

“It’s very difficult for me, as there are many people who are against me still in Copenhagen – some IS (ISIS) people,” she told Vice.

“It’s hard for me to get a job as PET (Danish counterterrorism) have been calling employers telling them I am a threat to national security, so it doesn’t seem like anyone is on my side.”