A train has hit two cars after one was rear-ended by the other at a level crossing in Melbourne, leaving the cars wrecked but their drivers unharmed.

Key points: Two cars ended up on train tracks in the suburb of Officer after one hit the other

Two cars ended up on train tracks in the suburb of Officer after one hit the other The train driver sounded the horn, giving the drivers time to get out of the way

The train driver sounded the horn, giving the drivers time to get out of the way Commuters experienced major delays along the Pakenham train line

Police said one of the cars was hit by the other in the south-eastern suburb of Officer about 7:00am on Monday, forcing both cars onto the tracks.

The drivers stopped to exchange details when the boom gates at the level crossing came down and the train headed towards them.

The occupants were able to get out of the way, but the train smashed into the cars.

One car was pushed into the boom gates, which were smashed by the collision.

The other was pushed about 150 metres along the train tracks before becoming trapped under the train.

One of the cars was pushed towards the boom gates by the train. ( ABC News )

An Ambulance Victoria spokeswoman said paramedics took a woman in her 60s to hospital with leg and shoulder injuries.

Paramedics also took a man in his 60s to hospital with minor injuries.

Two primary school-aged boys, who were passengers in the other car, were also taken to hospital, one with abdominal injuries and one with neck injuries.

Public Transport Victoria's Georgia Main said the train driver was "really shaken" but uninjured.

Another Metro Trains staff member and the 84 passengers on the train were all uninjured.

All Metro and V/Line train services between Berwick and Pakenham, in Melbourne's outer-east, were suspended.

Trains were stopped all Monday morning, with buses replacing trains on the Pakenham line and Traralgon V/Line service.

The car was pushed along the tracks for about 150 metres. ( ABC News )

Trains resumed at about 1:00pm and were running with minor delays.

Brunt Road was closed in both directions between the major arterial Princes Highway and the Rix Road thoroughfare.

Melbourne is in the middle of a blitz to remove level crossings across the city.

"Level crossings can be very dangerous, which is why we're trying to remove as many of them as possible," Ms Main said.