A KiwiRail ticket collector is credited with saving the life of an elderly woman who collapsed on a train to Wellington this afternoon by carrying out CPR between Petone and the main railway station.

Wellington Free Ambulance spokesperson Mark Shakespeare said the ticket collector became worried about the passenger and phoned 111 and was given instructions on CPR by an operator.

Mr Shakespeare said the woman was in cardiac arrest, and probably would have died on the seven-minute ride to Wellington without the guard's quick action.

The train was met at Wellington Railway Station by paramedics, who took over resuscitation, he said.

The 70-year-old woman has now been transferred to Wellington Hospital.

Two services were cancelled while paramedics treated the woman on the train.