Chancellor Olaf Scholz had been under criticism for weeks for hesitating to decide on sending the Leopard 2 tanks to Ukraine.
Berlin has agreed to deliver the German-made Leopard 2 tanks to help Ukraine repel Russia's invasion, a decision hailed by Kiev and its allies but slammed by Moscow as "extremely dangerous".
"This decision follows our well-known line of supporting Ukraine to the best of our abilities," Chancellor Olaf Scholz said in an announcement on Wednesday.
Scholz had been under criticism for weeks for hesitating to decide on sending the Leopard 2 tanks to Ukraine.
The head of Ukraine's presidential administration Andriy Yermak hailed the announcement, writing on social media:
"The first step on tanks has been taken," Yermak said, urging its allies to now build a "tank coalition".
"We need a lot of Leopards."
Germany will provide a company of 14 Leopard 2 A6 tanks from its Bundeswehr stocks, government spokesman Steffen Hebestreit said.
While scores of nations have pledged military hardware for Ukraine in recent weeks, Kiev has been clamouring for the more sophisticated Leopard tanks, seen as key to punching through enemy lines.
Several other European countries, including Finland and Poland, have said they are ready to provide their stocks, but had required Berlin's approval to transfer the German-made armaments to a third party.
Polish Prime Minister Mateusz Morawiecki, who had vocally sought German approval to send on the tanks, thanked Berlin for the decision and called it "a big step towards stopping Russia".
"Together we are stronger," he said, as Britain and France also welcomed the announcement.
But Russia's ambassador to Germany Sergei Nechaev warned that the "extremely dangerous decision takes the conflict to a new level of confrontation, and contradic ts statements by German politicians about the unwillingness of the German Federation to get involved in it".
Aside from sending the tanks to Ukraine, Berlin will also offer to train Ukrainian forces to use the tanks in Germany, as well as providing logistics, am munition and maintenance for the vehicles.
Germany did not specify the number of tanks in two battalions but for the Bundeswehr a battalion typically comprises of 44 tanks.
The Wall Street Journal has meanwhile reported that Washington was leaning toward sending a significant number of M1 Abrams tanks to Ukraine.
The Kremlin warned Wednesday that if Western countries supply Ukraine with heavy tanks they will be destroyed on the battlefield.
"These tanks burn like all the rest. They are just very expensive," Kremlin spokesman Dmitry Peskov told reporters.
The Kremlin's warning came as a Moscow-backed official said Russian forces had advanced in Bakhmut, a town in eastern Ukraine that Russia has been trying to capture for months.
The Ukrainian military also conceded to AFP that its troops had pulled out of battle-scarred Soledar, to the northeast of Bakhmut.
Russian forces had claimed control of Soledar earlier this month.
Amid the fierce fighting in eastern Ukraine, Kyiv and several of its allies had been urging Germany for weeks to allow the delivery of the Leopards, but a US-led meeting of Kyiv's allies in Germany last week failed to yield a decision.