The German government said on Tuesday it had approved sending up to 330 soldiers to help train the Malian army and support the French-led international deployment against Islamists.
Up to 180 German soldiers have been earmarked for the European Union Training Mission (EUTM), formally approved by EU foreign ministers in Brussels on Monday, a government statement said.
Forty of the German contingent will train up Malian forces, while a further 40 will act as medical support staff.
The other 100 will be available to provide logistical and administrative support in areas such as water and energy supplies, making Germany the second biggest contributor to the EUTM mission behind France, according to European sources.
Germany will also make another 150 soldiers available to back up the French army in Mali via air transport for French and African troops and help in the refuelling of planes.
Combat troops will not be sent to Mali.
The German Bundestag lower house of parliament is expected to approve the missions, whose mandates run until the end of February 2014, in a vote Friday.
Foreign Minister Guido Westerwelle welcomed the government's decision.
"We Europeans have a vested interest in world terrorism not gaining a safe haven in our neighbourhood," he said in a written statement.
"Therefore we want to support the Africans to be able to seize their responsibility for security in Mali," he added.
His spokesman Andreas Peschke told a regular government news conference that European discussions Monday on the training mission had indicated that it would deploy as long as necessary.
"I think training will take place there so long as is necessary to create an adequate number of trained Malian troops," he told reporters.
The cost of the two German missions would be more than 55 million euros ($73.6 million), defence ministry spokesman Christian Dienst told the same news conference.
Germany has already sent two Transall military transport aircraft to Mali, and put a third on standby.
The EUTM has a 15-month mandate to shake up the ramshackle Malian army in its effort to fight Islamist rebels who last year seized control of the country's vast arid north.
The 27 EU nations first approved the idea of a training mission in December but its deployment was accelerated after the surprise intervention of France in its former colony on January 11 to halt the insurgents' march on the capital.