An Afghan woman who was jailed for forced adultery after a relative raped her, then pardoned following an international outcry over the case, has been released nearly two weeks after a judicial panel said she could go free, her lawyer said on Wednesday.

She was released last night, said lawyer Kimberley Motley. She's happy that she's in a safer place.

Sex outside marriage - even in cases of rape - is one of several moral crimes for which women are imprisoned in Afghanistan. Others include running away from an abusive husband or a forced marriage.

Gulnaz, now 21, was attacked by her cousin's husband in 2009 and then given a two-year sentence for adultery by force. She gave birth to a daughter behind bars.

Her jail term was raised to 12 years on appeal, but she was told she would be freed if she agreed to marry her attacker.

Her sentence was cut to three years at another appeal in November, and the requirement that she marry her rapist, who is serving a seven-year sentence, was dropped.

Motley said that as her attacker was still in jail, the question of whether she would marry him was off the table for the moment.

Logistically, it's not something that's going to happen right now, she said.

Gulnaz's imprisonment attracted international disapproval, and on December 1 the presidential palace said Gulnaz had been granted clemency. On Tuesday, her lawyer said she understood from conversations with lawmakers that most prisoners in her position were freed within two days.

(Reporting by Daniel Magnowski)