A man has been taken to hospital with suspected serious injuries after a train carrying around a dozen passengers hit a car at an unmanned level crossing, police said.
The crash happened just outside Stranraer, Dumfries and Galloway, shortly before 2pm.
Police said the driver of the car was taken to the Southern General Hospital in Glasgow.
The train passengers are being taken to a triage centre in Stranraer, where their condition will be assessed, although they are not thought to have serious injuries.
It is thought that the car driver was the only person inside the vehicle.
Dumfries and Galloway Constabulary said the incident happened on the Kilmarnock to Stranraer line and involved a train with two carriages.
Fire, police and ambulance crews attended the scene in the Dunragit area.
The crash blocked the train line and damaged the car extensively, police said.
A force spokesman said: "Just before 2pm a train collided with a car at a level crossing just outside Stranraer.
"The driver of the car has been taken to the local hospital but is now going to the Southern General Hospital with what are believed to be fairly serious injuries.
"The train passengers, which are about a dozen, are on the way to Stranraer to be checked over.
"An investigation will be carried out into what happened."
It is thought the train passengers were being taken to a triage centre set up at a local community hall, where they will then be assessed to see if they need any further treatment.
ScotRail said the driver of the train and one passenger were treated for shock, while the other eight passengers have no immediately reported injuries.
The train involved in the accident, which happened at Little Genoch Level Crossing between Dunragit and Stranraer, was the 11.42am Glasgow Central to Stranraer service.
The vehicle involved in the incident was a Mitsubishi Shogun 4x4, police said.
Services to and from Stranraer are expected to be disrupted for the rest of the day, with no trains going in or out of the town.
Replacement transport has been arranged, and is as follows: the 4.25pm service from Glasgow Central to Stranraer will terminate at Ayr with onward bus transport to Stranraer.
The 7.45pm Stranraer to Glasgow Central service will start from Ayr, with bus transport from Stranraer, and the 6.40pm Ayr to Stranraer train will terminate at Girvan, with a replacement bus to Stranraer.
A ScotRail spokeswoman said: "We have arranged replacement transport on this route for the remainder of the day, and apologise for the inconvenience while investigations continue.
"We would encourage customers to check scotrail.co.uk/disruption for the latest updates."