Morocco s Foreign Minister Nasser Bourita. AP
Rabat in March said it was suspending contacts with the German embassy in the North African kingdom over "deep misunderstandings" on "issues fundamental for Morocco".
In May it announced the recall of its ambassador for consultations and accused Germany of unspecified "hostile acts".
Germany's criticism of former US president Donald Trump's recognition of Moroccan sovereignty over the disputed Western Sahara was among the apparent points of friction.
"The Kingdom of Morocco appreciates the positive announcements and constructive positions made recently by the new federal government of Germany," Morocco's foreign ministry said in a statement.
"These announcements allow us to envisage a reviving of bilateral cooperation and the return to normal work of the diplomatic representatives of the two countries in Rabat and Berlin," it said.
Olaf Scholz became Germany's new chancellor on December 8, pledging his centre-left-led coalition would offer a "new beginning" for the country.
Several days later, Berlin's foreign ministry called Morocco an "important link between North and South, politically, culturally and economically".
It also said Morocco "plays an important role in the stability and sustainable development of the region" and that a proposal by Rabat of autonomy for Western Sahara was an "important contribution" to a settlement.
But Berlin also said its position on the status of Western Sahara had not changed for decades.
Morocco controls most of Western Sahara, which it views as its own territory. Rabat fought a 15-year war with the Polisario Front independence movement after Spain withdrew from its former colony in 1975.
A United Nations-monitored ceasefire deal provided for a referendum but Morocco has since rejected any vote that includes independence as an option, offering only limited autonomy.
Tensions over the region have risen in recent months, with the Polisario saying it would step up military operations, and diplomatic ties cut between Morocco and Algeria, the Polisario's main backer.
In December last year, Morocco renewed official relations with Israel while Washington recognised Rabat's sovereignty over Western Sahara, in one of a series of normalisation deals brokered by the Trump administration.
Morocco has had generally good relations with Germany, which provides it with a substantial amount of financial aid. Berlin is one of Rabat's main trading partners.