The young woman could face the death penalty if found guilty by a court in Mauritania.
Mauritanian authorities have charged a high school student with blasphemy over a mock exam paper she submitted.
The young woman was arrested last week for allegedly showing disrespect to the Prophet Muhammad, the founder of Islam.
If found guilty, she could be sentenced to death with no possibility of appeal.
Mauritania has strengthened its blasphemy laws in recent years, removing the clause allowing offenders to escape death if they show remorse.
Nevertheless, there have been no executions for blasphemy in the country for more than 30 years.
The student was arrested on 18 July in the northwestern town of Atar on charges of "disrespect and mockery of the Prophet" and using social networks "to undermine (the) holy values of Islam", an official from the public prosecutor's office in the capital, Nouakchott, told the AFP news agency.
Specific details of what she was alleged to have written were not released.
The student's family later released a statement to the pan-Arabic newspaper Al-Quds al-Arabi in which they asked for forgiveness, saying she suffered from mental health issues.
Another news outlet, al-Quds al-Araby, reported that the accused is from the Haratin ethnic group, who are the descendants of slaves of sub-Saharan origin.
The official announcement of the arrest comes after the country's religious authorities decreed that people found guilty of insulting the Prophet Muhammad should face the death penalty.
The Mauritanian Council of Islamic Scholars issued the edict last week after President Mohamed Ould Ghazouani ordered clerics to clarify their stance on blasphemy.
Aside from the death penalty, those who are convicted of lesser blasphemy offences can face up to two years in prison and a fine.
African countries are known to take religious beliefs to ridiculously unnecessary extremities. I heard an example of a Muslim mother who killed their daughter for being raped, somehow bringing dishonor to their family. Don't let the minority be representative of the majority.