Updated

She fought against the Islamic State – and now risks jail time for doing so.

Joanna Palani, a 23-year-old Danish woman, was facing a 6-month prison sentence after fighting alongside Kurdish peshmerga forces in Iraq and Syria, The Local reported.

PARIS ATTACK PLANNERS AMONG 3 ISIS FIGHTERS KILLED IN DRONE STRIKE, PENTAGON SAYS

Palani had her passport confiscated last year after she returned to Denmark, and was hit with a one-year travel ban, for violating the nation's so-called "foreign fighter" rules. The regulations were aimed at stopping Danish citizens from joining terror groups, but could punish people who fight on the other side, according to analysts.

Palani has also been associated with the Kurdish militia group YPG, which is linked to the Kurdistan Workers' Party, deemed a terrorist organization by the European Union and the U.S., according to The Local.

“How can I pose a threat to Denmark and other countries by being a soldier in an official army that Denmark trains and supports directly in the fight against the Islamic State?” she wrote on Facebook after officials took her passport.

The potential 6-month prison sentence stems from the travel ban violation. Palani admitted to traveling to Qatar in June and was detained last week, The Local reported.

Palani’s lawyer says she will return to Copenhagen City Court on Dec. 20.

Click for more from The Local.