Firefighters have helped bale out properties across the Lothians after rising flood waters threatened to damage a bungalow and a health centre.
Crews managed to divert water away from a home at Loanstone in Penicuik by digging trenches and placing sandbags strategically outside the property.
A local farmer helped the flood effort by assisting fire officers with a JCB digger.
Floods left a health centre in Main Street, East Calder, under two-foot of water after a local burn burst its banks.
Fire crews used a portable pump to remove the water before deploying sandbags to keep it at bay.
It is thought Linhouse Water had become swollen by heavy rains and flooded Main Street.
Meanwhile warnings have been issued for Edinburgh and Lothian amid fears the Water of Leith could burst its banks.
The Scottish Environment Protection Agency (SEPA) has raised the alarm with an amber flood warning after several days of heavy rainfall and more showers to come throughout Monday.
There is potential for localised flooding to low-lying land and “vulnerable roads”, SEPA said.
A spokesman said: “The Water of Leith and Braid Burn have started to respond to observed rainfall and are of most concern within the region.”
In West Lothian, Cousland Road in Livingston is closed from the Mill roundabout to the junction of Howden West Road at St John’s Hospital. Mains Road in Linlithgow is also closed.
A statement from ScotRail said: “Due to flooding between Linlithgow and Haymarket services running between Edinburgh-Glasgow Queen St are reduced to half hourly.”