At least two people were expected to lose their jobs over the scandal and a disciplinary investigation had been launched, Ulrich Wilhelm, a German government spokesman, said later.
Frank-Walter Steinmeier, the German foreign minister, telephoned his counterpart in the Afghan government on Saturday and told him those involved have been disciplined and three officials moved to other duties.
Sultan Ahmad Baheen, an Afghan foreign ministry spokesman, said that Rangeen Dadfar Spanta, the Afghan foreign minister, had accepted the apology.
Baheen said the Afghan government had been assured that "this was the only case and it would not be repeated".
"We are very sad about this issue, especially from a friendly government," he said.
"At the same time, we are looking forward that this issue will not overshadow our relations with Germany which are strong and historical."
The story emerged last week when German media revealed that the BND had illegally monitored emails between Farhang and Koelbl for several months in 2006.
It remains unclear why the BND set its sights on Farhang, who has a German passport and lived for several years in Germany.
Der Spiegel said the Afghan minster had been a secret source for several of its articles in recent years.
Germany has about 3,200 troops in Afghanistan working as part of Nato's International Security and Assistance Force.