Climate activist Greta Thunberg has become embroiled in a Twitter spat with a German rail company after she posted a picture of herself sitting on the floor of one of their trains surrounded by bags.

Ms Thunberg was sitting on the floor on the train as she passed through Germany on Saturday on her way back from the COP25 climate summit in Madrid to her home in Sweden.

The 16-year-old posted a tweet on Saturday with a picture of herself sitting on the floor with the comment: “Traveling on overcrowded trains through Germany. And I’m finally on my way home!”

But German railway operator Deutsche Bahn, who has come under fire in recent years for delays, last-minute train cancellations and expensive ticket fares, replied to the teenager’s tweet refuting her claim and saying she in fact had a seat in first class.

“It would have been even nicer if you had also reported how friendly and competently our team served you at your seat in first class,” the company's tweet said.

Ms Thunberg later tweeted the fact she did not at first sit in a seat, and her post was not meant as a knock against Deutsche Bahn, who also tweeted to thank the teenager for her support, pointing out the train she was on had been running 100% on eco-friendly electricity.

The teenager wrote: “Our train from Basel was taken out of traffic. So we sat on the floor on 2 different trains. After Göttingen I got a seat.This is no problem of course and I never said it was. Overcrowded trains is a great sign because it means the demand for train travel is high!"

Ms Thunberg has spent months travelling by trains and boats to different climate events in Europe and the US after vowing not to fly.

The teenager, who was recently named Time magazine’s Person of the Year for her efforts to prod governments and others to take faster actions in fighting climate change, is not the first person in the public eye to have a spat with a train company over seats - or a lack of them.

Jeremy Corbyn was filmed sitting on the floor of a 'rammed' train. Credit: Twitter

Labour leader Jeremy Corbyn became embroiled in 'traingate' after he tweeted a picture of himself sitting on the floor of the vestibule of a Virgin train.

He was pictured hunched on the carriage floor of a three-hour Virgin Trains service between London and Newcastle reading a newspaper.

In the accompanying post, he said: "This is a problem that many passengers face every day", before calling for re-nationalisation of the railways.

But Virgin Trains later released counter CCTV footage which appeared to show Mr Corbyn and his team walking past empty, unreserved seats before the filming began.