KABUL, Afghanistan  The Supreme Court in Afghanistan has upheld a 20-year prison sentence for an Afghan university student journalist accused of blasphemy. The case has alarmed news media and rights organizations in the country and abroad.

The student’s family and lawyers said Wednesday that they had learned only recently about the court decision, which was made in secret on Feb. 12, and they called the procedure illegal.

The student, Parwiz Kambakhsh, 24, from northern Afghanistan, was arrested in 2007 and sentenced to death for blasphemy after accusations that he had written and distributed an article about the role of women in Islam. Mr. Kambakhsh has denied having written the article and said he had downloaded it from the Internet. His family and lawyers say he has been denied a fair trial.

In 2008, an appeals court in Kabul commuted the death sentence to 20 years’ imprisonment, a decision that was upheld by a tribunal of the Supreme Court last month.