Mr. Karzai’s government was unabashed about the new law.

“In order to make these truly national commissions, this decree has excluded the foreign members,” said Ahmad Zia Seyamak Herawi, a deputy spokesman for President Karzai.

Image President Hamid Karzai of Afghanistan at a news conference in Kabul last December. Credit... Adam Ferguson for The New York Times

“There can be Afghan and international monitoring bodies to monitor the elections of Afghanistan, but we are not going to allow the foreigners with high salaries to be involved in our elections,” Mr. Herawi said. “As they are not Afghans, they won’t care about Afghanistan’s national interest, and they are creating problems for us.”

The change in the law was part of “the process of Afghanization,” Mr. Herawi said. The term has been coined by American and other Western diplomats to describe the process of Afghans taking responsibility for their own governing and security.

Afghans have begun to use it, too, to burnish their bona fides as patriots intent on promoting their countrymen.

Indeed, some Afghans appeared to avoid being overly critical of efforts to give Afghans the powerful roles previously filled by Westerners. Mohammad Kabir Ranjbar, an independent member of Parliament who represents Kabul, supported Afghans assuming a greater role, but he said the government was not yet ready. “To Afghanize the process and the complaint commission is something necessary, but it should happen when we have a government to obey the law which we don’t have yet,” he said.

Potential candidates in the parliamentary elections found the new law discouraging. “His aim is to engineer a Parliament that will be his ‘yes’ men,” said Saleh Registani, a former member of Parliament who was hoping to run again this year.

The loophole Mr. Karzai took advantage of was an apparent contradiction between two provisions in the Afghan Constitution.