Individual units of the Libyan coastguard have long been accused of mistreating migrants and NGOs.
Germany says that its military will no longer train Libya's coastguard over concerns about the treatment of migrants.
Foreign Ministry spokeswoman Andrea Sasse said Libyan officials had demonstrated "repeated unacceptable behaviour" towards refugees and NGOs.
Individual units of the Libyan coastguard have long been accused of mistreating migrants, who are caught trying to reach Europe by boat.
"[In view of this] the German government cannot currently justify the training of the Libyan coast guard by German soldiers," Sasse said on Wednesday.
“The coast guard has acted in a completely unacceptable and illegal manner,” Sasse said, referring to two incidents in July 2021.
The announcement came as the German government agreed to extend its participation in the European Union naval mission, known as Operation Irini, which monitors an arms embargo against Libya.
A recent report by the head of Operation Irini had acknowledged “excessive use of force” by Libyan authorities but called for European training programmes to continue.
The training of Libyan forces began seven years ago under Operation Sophia, as large numbers of migrants tried to reach the EU via Libya. The mission was then replaced in 2020 when the focus shifted to arms control.
Operation Irini itself has been criticised for not doing enough to save migrants at sea despite EU vessels conducting extensive monitoring in the area.
Several NGOs are also involved in the rescue of migrants, including the Germany-based group Sea-Eye which took in 32 migrants this week off the coast of Libya.
German government spokesman Steffen Hebestreit said that under the extended naval mandate -- which needs to be approved by parliament -- Berlin will continue to monitor the arms embargo and prevent the illegal export of oil from Libya.
“[This] should help to fight the business model of people-trafficking networks,” he said.