He added, “We have the evidence now, and we are going to go for prosecution.”

The arrest came as the Pakistani authorities were cracking down on Afghans with illegal national identity cards. The authorities said Ms. Gula had illegally obtained a Pakistani identity card in 1988 and a computerized identity card in 2014, while retaining her Afghan passport, which she used in 2014 to travel to Saudi Arabia for the hajj.

Image Sharbat Gula in a Pakistani police photo after she was arrested on Wednesday. Credit... Pakistan Federal Investigation Agency

She faces up to 14 years in prison and a fine of $3,000 to $5,000 if she is convicted, according to the Dawn news agency.

Her arrest goes to the heart of an ordeal confronting many Afghan refugees who fled across the border into Pakistan because of decades of war. The Pakistani crackdown on Afghans appears to have intensified since May, when the former Taliban leader Mullah Akhtar Muhammad Mansour was killed in a drone strike in Baluchistan Province.

He had been traveling with forged Pakistani documents, officials said.

Gerry Simpson, a senior researcher and advocate for the Refugee Rights Program at Human Rights Watch, wrote online that 1.5 million Afghans in Pakistan have received “proof of registration” cards, which protected them from deportation. About one million more who did not get the paperwork resorted to using false identity cards. Mr. Simpson wrote that Pakistan was now on a mission to repatriate all Afghans.

The Pakistani authorities have revoked or blocked thousands of national identity cards illegally obtained by foreigners. Ms. Gula, who is believed to be in her 40s, was caught up in that dragnet when she was arrested. A court said on Wednesday that she could be kept in custody for two days while the authorities investigated.