Hundreds of drivers were left stuck on the Edinburgh city bypass on Thursday evening after a day of heavy rain and flooding.
The Met Office had issued a yellow weather warning for heavy rain which began at 12pm on Wednesday and was in force until 3am on Friday covering the whole of central and southern Scotland.
It warned of a risk of fast flowing or deep floodwater causing danger to life.
As a result, the A720 between Dreghorn and Lothianburn in both directions was closed due to severe flooding from around 5.30pm on Thursday.
The road was reopened fully shortly after 3.30am on Friday after teams worked through the night to clear the floodwater.
The A720 Sheriffhall was also badly affected by flooding.
Amid the congestion, Transport Scotland said Bear Scotland had been pumping water since the afternoon and police officers were making “welfare checks” and diverting traffic via nearby slip roads.
Traffic Scotland has now confirmed that all lanes are open.
Edinburgh council had also posted images of heavy flooding in Princes Street Gardens on Thursday and advised that both the gardens and Inch Park in the south of the city would be closed until further notice.
Images and videos posted on social media showed the Water of Leith in the city broke its banks after water was at very high levels and “surging” towards Murrayfield.
The Royal Botanical Gardens Edinburgh recorded 48mm of rainfall, the average amount for the entire month of May.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country