Hundreds of thousands of people faced train cancellations across Germany from Wednesday, as a three-day nationwide rail strike added to travel chaos in Europe's largest economy, where ongoing farmers' protests have also snarled road traffic.

The GDL train drivers' union began its main strike in the early hours of Wednesday, joining one by cargo train drivers who walked out on Tuesday evening.

The strikes will continue until Friday evening, forcing national rail operator Deutsche Bahn to run only stripped-back emergency timetables.

One in five long-distance high-speed rail services were running and regional services have been "massively thinned out", a Deutsche Bahn spokesperson told reporters at Berlin's central station, empty of its usual crowds.

The rail operator has encouraged people to cancel or postpone all non-essential travel.

The spokesperson called the strike "an absolute imposition in a week like this, when the mood is already charged and difficult conditions for mobility in Germany make the whole thing a challenge".

The head of the German farmers' association DBV vowed to ramp up their protests on Wednesday, after convoys of tractors and trucks blocked roads across the country earlier this week.

The long-running row over trains drivers' pay and working hours flared up again following a three-week truce over Christmas, and after an effort by Deutsche Bahn to block the latest strikes with a court injunction did not succeed.

The GDL is seeking a reduced working week for its shift workers, from 38 to 35 hours, on current wages. Deutsche Bahn has offered flexibility on working hours but refused to reduce them without a pay cut.

"We are prepared to make compromises and gradually reduce the weekly working hours so that the employer side also has the opportunity to train staff," GDL boss Claus Weselsky told the ZDF public broadcaster.

"If we get nothing by Friday, we'll take a break then enter the next round of industrial action," he added.

The cargo rail strike was also set to cause disruption. The Federation of German Industries (BDI) warned of supply chain problems, saying almost a fifth of German freight traffic is transported via the railways.

"Here, too, we are trying to minimise the impact as much as possible," the Deutsche Bahn spokesperson said.

The nationwide rail strikes add to Germany's growing economic problems, as Europe's largest economy faces weak macroeconomic data, high interest rates and mounting criticism of the coalition government.

This week's farmers' protests, sparked by anger over planned subsidy cuts, have piled pressure on Chancellor Olaf Scholz, whose government is trying to finalise its 2024 budget. ($1 = 0.9149 euros) (Reporting by Rachel More, writing by Miranda Murray, editing by Jamie Freed and Barbara Lewis)