File photo of German troops who are part of the NATO-led International Security Assistance Force (ISAF), attend a memorial ceremony for slain soldiers, in the German Army's Camp Marmal in Mazar-e-Sharif, May 8, 2013. REUTERS/Omar Sobhani

BERLIN (Reuters) - Chancellor Angela Merkel’s cabinet on Wednesday approved the continuation of Germany’s deployment of up to 980 soldiers to Afghanistan through the end of 2017, a government spokesman said.

The decision, which must still be approved by parliament, came less than a week after armed Taliban militants stormed the German consulate in the northern Afghan city of Mazar-i-Sharif and killed at least four Afghans and wounded more than 100 people.

“With up to 980 soldiers, the German army will in future advise, support and train Afghan security services,” said the government in a statement.

Germany, which heads the NATO-led Resolute Support mission in northern Afghanistan, has its soldiers stationed on the outskirts of Mazar-i-Sharif, and another 150 soldiers in Kabul.

The NATO mission includes a total of 13,000 foreign troops from Germany, Italy, the United States and others. The NATO forces are focused on training the Afghan army and police, not combat operations.

Germany is also slated to provide up to 1.7 billion euros in civilian aid to Afghanistan through 2020.