TUNIS, Tunisia — Prime Minister Youssef Chahed of Tunisia on Friday prohibited anyone wearing the niqab, a religious covering for the face with only an opening for the eyes, from entering public institutions and government offices, citing security reasons.

After Tunisia’s 2011 revolution, which started the Arab Spring, an Islamist political party came to power and Tunisians were divided over use of the niqab in public spaces. There was broad public debate over women’s rights and religious freedom.

But since then, terrorist attacks and a concentrated effort to fight them mean that for much of the population, safety, and the need to clearly identify faces, have taken precedence, making Tunisia’s ban “not so surprising,” according to Amel Grami, a professor at Manouba University who studies Islam and is the author of a book about women and jihad.

“Society is aware of the necessity of security,” she said. “We have been through several heavy terrorist attacks.”