On Thursday, some of Mr. Zmarai’s victims laughed at how badly they had been duped.

Gen. Noor Habib Gulbahari, the police chief of Baghlan Province and one of the recipients of the certificates, said Mr. Zmarai had introduced himself as a prince and governmental envoy in charge of security matters in the northeast of the country.

“He gave certificates of appreciation to some high-ranking officials — including the army corps commander, myself and some other officials,” General Gulbahari, in a kind of humorous amazement, said in a phone interview. “He came to Baghlan from Balkh with a bunch of army commandos, then he called the army corps commander in Balkh to inform him that he had arrived safely to Baghlan. I also talked with the corps commander in Balkh through his phone, and he told me to take care of him.”

During his stay in Baghlan, Mr. Zmarai was put up in a government guesthouse. When he moved on to assess the security situation in neighboring Kunduz Province, General Gulbahari asked his deputy to accompany Mr. Zmarai in a convoy and provide security for the journey.

“We did not ask him for any document or ID as he came in an army chopper and with army commandos,” General Gulbahari said. “He did not ask us for money or anything.”

A picture of Mr. Zmarai’s broad exploits over the past decade and a half was quick to emerge.

Mr. Zmarai, believed to be in his late 20s, hails from Khanabad District in Kunduz Province, according to government officials and relatives who were reached by phone. His father sells wheat in the local market, and his brothers work as tailors and mechanics.

Relatives, who spoke on condition of anonymity as they did not want to anger the family, said Mr. Zmarai had made his foray into con work about 14 years ago. He would pose as a government inspector on local projects in Khanabad, luring officials and contractors to give him a cut. But early on, he was arrested twice by the authorities.