Torrential rain has brought flooding to many parts of Scotland, causing disruption on roads and the railways.
Rising river levels caused problems in Hawick
The West Coast Main Line was closed between Carlisle and Glasgow for much of the day, with passengers completing their journeys by bus.
The worst-hit area was Hawick, where the River Teviot burst its banks and many properties were flooded.
But river levels fell and the number of flood alerts was reduced as the rain eased across Scotland during the day.
On Wednesday night only two Scottish Environment Protection Agency (Sepa) flood warnings remained in place, one on the Teviot Water and the other on the Spey near Fochabers.
Some residents of Hawick had left their homes voluntarily during the day after the heavy overnight rain, but returned later.
Drivers in the Lothian and Borders area were advised to stay at home unless their journeys were essential.
Hawick High School will be closed for most pupils on Thursday and Friday after being partially flooded, while some primary schools shut early on Wednesday.
Businessman David Blair said the town had been devastated by the floods.
"There were cars floating about on the high street and there was a car actually through one of the windows of a local shop," he said.
"Across the other side of the river they were evacuating all of the residents on the ground floor on a lot of the streets."
Lothian and Borders Fire Service said it received many calls overnight - largely from residents in Hawick and parts of Edinburgh.
In one, an 81-year-old woman who has difficulty breathing had to be rescued and was taken to hospital.
Another elderly woman was rescued by crews from her flat in the town and taken in by a neighbour in a flat above.
A flood group was set up at St Boswells to help co-ordinate the rescue effort.
In Selkirk, crews became stranded in flood water while trying to rescue a woman who had gone missing after trying to make her own way from a flooded caravan to a nearby farm.
Pensioner Roy Baker used his canoe on flooded playing fields at Bridge of Allan
She was later found safe and well.
A number of homes in Aberdeen's harbour area were flooded and there were problems on some roads in the area.
Two landslides closed roads in Dumfries and Galloway. The A708 was closed two miles east of Moffat and the B709 was closed between Eskdalemuir and Langholm.
A 76-year-old lorry driver died after his vehicle overturned in heavy rain in the Borders on Tuesday.
John Stobo, from the Newcastle area, died in Edinburgh Royal Infirmary following the accident on the A68 near Ancrum.