A passenger who boarded the train said it was stiflingly hot (Representational)

Four people died in 'unbearable' heat while travelling by train in Uttar Pradesh's Jhansi, which has been in the grip of a heat wave for two weeks, officials and passengers said Tuesday.

The four died Monday while travelling from Agra -- the city of the Taj Mahal -- to Tamil Nadu's Coimbatore.

"Heat seems to be a factor," Indian Railways spokesman Ajit Kumar Singh told AFP, "it is really unfortunate".

"When the train was approaching Jhansi, we got a call from the on-board staff that one of the passengers is unconscious," Mr Singh said.

"We rushed medical staff to the station but they found that three of the passengers were already dead."

A fourth person died later in hospital.

Temperatures have hovered around 45 degrees Celsius (113 Fahrenheit) in Jhansi in recent days.

Mr Singh said the Kerala Express train had no technical problems, but the tourists were not in air-conditioned coaches.

A passenger who was a part of the group that boarded in Agra said the train was stiflingly hot.

"Shortly after we left Agra, the heat became unbearable and some people started complaining of breathing problems and uneasiness," the passenger was quoted as saying by News18 television.

"Before we could get some help, they collapsed."

One of the dead was 81 years old, the channel said.

Much of the country has been sweltering in temperatures that have risen above 50 degrees Celsius (122 Fahrenheit) in Rajasthan. A number of deaths from heat stroke have been reported.

Temperatures touched 50.3 degrees Celsius in Rajasthan's Churu recently, just below the country record of 51 degrees.