The German government said Friday it had asked a US court to throw out a lawsuit brought by indigenous groups from Namibia seeking reparations for the genocide of their peoples under German colonial rule.

It was the first time Berlin has formally responded to the class-action suit launched by the Herero and Nama people last year over the tens of thousands killed in the 1904-1908 massacres.

Berlin's position 'is that the complaint is inadmissable because of the principle of state immunity', foreign ministry spokeswoman Maria Adebahr told reporters, a day after a New York judge held a 10-minute hearing in the case.

'In accordance with US law it was necessary to formally convey this to the court. We did this through a lawyer,' Adebahr said.

Namibian former Culture Minister Kazenambo Kazenambo stands by a statue of Chief Hosea Katjiku-Ru-Rume-Kutako as he speaks of talks and negotiations about the alleged genocide committed by German forces against Herero and Nama people in 1904 in 2017

Germany has been taken to a US court over a request for reparations from Namibian people for the early 20th century genocide of the Herero and Nara people (file photo)

US District Judge Laura Taylor Swain agreed to consider Germany's request, but set no date for ruling on it. The next hearing in the case has been set for May 3.

Germany has acknowledged that atrocities occurred at the hands of German colonial authorities, but it has repeatedly refused to pay direct reparations.

It has argued that its development aid worth hundreds of millions of euros since Namibia's independence from South Africa in 1990 was 'for the benefit of all Namibians'.

Aside from financial compensation, the plaintiffs also want to be included in ongoing negotiations between Germany and Namibia aimed at reaching a joint declaration on the massacres.

Greman authorities are trying a 'particularly affected communities trust pact' in which communities in Namibia that historically were particularly affected by the genocide would receive special prject help in the form of vocational training, electricity, shelter and land reform, DW.com reports.

Commenting for the first time on the class-action suit against it, Germany has asked a US court to throw out the case (file photo)

Berlin's position 'is that the complaint is inadmissable because of the principle of state immunity', foreign ministry spokeswoman Maria Adebah (file photo)

'When we agree on projects, we will try to make sure that they are mainly directed towards the areas of the Hereros and Namas,' German special representative Ruprecht Polenz told DW.com.

The dispute hearkens back to a period over a century ago when South West Africa, now known as Namibia, was a German colony.

The suit alleges that from 1885 to 1903 about a quarter of Ovaherero and Nama lands - thousands of square miles - was taken without compensation by German settlers with the explicit consent of German colonial authorities.

It also claims that those authorities turned a blind eye to rapes by colonists of Ovaherero and Nama women and girls, and the use of forced labor.

Tensions boiled over in early 1904 when the Ovaherero rose up, followed by the Nama, in an insurrection crushed by German imperial troops.

In the Battle of Waterberg in August 1904, around 80,000 Herero fled including women and children.

German troops went after them across what is now known as the Kalahari Desert. Only 15,000 Herero survived, and up to 100,000 died.

The smaller Nama tribe faced a similar fate. Around 10,000 of them were killed as they sought to rebel against the Germans during the conflict.

German colonists would later sell the bones of deceased Herero people to museums such as the Museum of Natural History in New York, the New Yorker reports.

Germany has acknowledged that atrocities occurred at the hands of German colonial authorities, but it has repeatedly refused to pay direct reparations (file photo)