ATENA FARGHADANI, the 29-year-old artist who had been sentenced to more than 12 years in prison after drawing Iran’s parliament as animals, has just been freed, according to her attorney.

“She’s very, very happy,” her attorney, Mohammad Moghimi, told The Post’s Comic Riffs through an email interview communicated and translated by Nikahang Kowsar, a board member of Washington-based Cartoonists Rights Network International.

Farghadani’s crimes, the Iranian courts had said, included “insulting members of parliament through paintings” and “spreading propaganda against the system,” according to human-rights groups.

Farghadani was arrested in the summer of 2014 after she drew “parliament as animals” to protest the government’s measures to curb birth control.

“Atena has suffered, and like many other activists and artists and journalists, should not spend time behind bars for expressing her opinions,” Kowsar, who himself was jailed by Iranian authorities in 2000 over his editorial cartoons, told The Post’s Comic Riffs on Sunday, in anticipation of her release.

Moghimi expected his client’s freedom after their recent legal victories. “The charges for undermining national security have been dismissed,” Kowsar told Comic Riffs. “The Revolutionary Court loves to label activists with this dangerous charge, and now she’s been acquitted from that part of the sentence. Her sentence for insulting the Supreme Leader [Ayatollah Ali Khamenei] was also suspended.”

Moghimi says that Farghadani’s joy over her release is mixed with the sadness of knowing that her former cellmates remain at Evin Prison, with fewer to no public supporters because of their lower profiles. Farghadani’s case had attracted worldwide attention, including visual protests by artists based in Europe, Australia and the United States.

During her imprisonment, Farghadani reportedly was subjected to strip searches and a forced “virginity test” — the latter after Moghimi himself was imprisoned for shaking hands with his client while working on her case. He says that his time inside a cell affirmed his belief that Iran’s correctional system needs to evolve.

Moghimi also said that Farghadani does not want to leave Iran, and that she remains convinced that artists have a duty to challenge the status quo and spark social change through their artwork. “She believes that art means paying a great price with your own life,” the attorney said, “when art is used to support human rights, world peace and humanity.”

[This post has been updated.]