In his address to a large gathering at the Istanbul-based Sebahattin Zaim University, Erdogan said: "Germany! I am telling again: first, you give an account of the Holocaust. How you decimated, killed over 100,000 Namibians in Namibia, you should give an account of that."
The Holocaust refers to the mass-killing of Jews by Adolf Hitler's Nazi Germany during the World War II.
The Namibia Holocaust is considered one of the first genocides of the last century, which was carried out against the Heroro and Nama peoples in southwest Africa by the then German empire.
The Turkish president said Germany should have been the last country to hold a vote on a “genocide”.
"Our history is not the history of massacres. Our history is the history of mercy [and] compassion. This is the difference between us," Erdogan said.
About 100,000 Armenians living in Turkey, Erdogan said: "Half of them are our citizens, half of them are not. But, we did not drive away them ... We are hosting incomers from Armenia as guests at the moment."
"If we were a country that was an enemy of Armenians, we would have sent all of these people back to Armenia," Erdogan said.
The president also reacted to claims that accused Turkey of "burning and seizing Armenian churches", saying: "On the contrary, we are handing over churches to Armenian foundations. If they have assets, we deliver it to them."
He also said that the magnificence of Western capital cities came from millions of Africans.
"Today, when we lift the curtain of magnificence we witness in western capitals, we see tragedy [and] tears of millions of Africans.
"Under the elegant pavements of Berlin, Paris, Brussels are life, blood, efforts and elbow greases of Africans," the president said.
On Thursday, the lower house of the German parliament approved a non-binding resolution recognizing Armenian claims of “genocide” during the 1915 events.
The resolution accused the Ottoman government of 1915 of allegedly carrying out “systematic genocide” against Armenians, as well as other Christian minorities.
Turkey denies the alleged Armenian “genocide”, but acknowledges that there were casualties on both sides during the events taking place in World War I.
According to Turkey's viewpoint, deaths of Armenians in eastern Anatolia in 1915 occurred after some sided with invading Russians and revolted against Ottoman forces. A subsequent relocation of Armenians resulted in numerous casualties.
Turkey describes the 1915 events as a tragedy for both sides.
Ankara has repeatedly proposed the creation of a joint commission of historians from Turkey and Armenia plus international experts to tackle the issue.