A German man has sued a town for discrimination over 'female-only' parking spots which were set up after a woman was raped nearby.

Dominik Bayer said the car parks in the town of Eichstätt in Bavaria discriminated against men.

The signs indicating the parking spots were also prejudiced against women because they suggested females could not look after themselves, he said.

A German man has sued a town for discrimination over female parking spots (file photo) which were set up after a woman was raped nearby. The sign reads: 'Only for women'

But town officials said the signs were only a suggestion and that men would not be punished for parking there, N-TV reported.

The parking spaces were set up in well-lit areas after a woman was raped in the town in 2016.

The town's legal officer Hans Bittl said the female parking spots were there 'on safety grounds'.

The signs were 'purely a suggestion' and a male driver could not be prosecuted for parking there, Mr Bittl said.

'It is statistically proven that more women are the victims of violent crime than men,' he said.

Dominik Bayer said the car parks in the town of Eichstätt (file photo) discriminated against men but officials said the signs were only advisory

The car park is near an old people's home, and younger women who work there often have to arrive early or leave late in the dark.

Germany's federal anti-discrimination agency has said that female parking spaces do not violate equality laws.

The ADAC, Germany's leading motorists' association, said on its website that the female spots are not a formal part of the highway code, having the same status as parent-and-child spaces.

Police could not intervene if a man parked there but the owner of the car park could ban a motorist from the site, they said.

Women-only parking spaces in car parks were usually well-lit, watched by CCTV cameras and near the exits, they said.