Kenyan Joseph Mutunga Mbithi won the Edinburgh Marathon, finishing in 2 hours 15 minutes and 46 seconds - 20 seconds short of the course record.
His countrymen, John Musila Kioko (2.16:28) and Jonothon Kipsaina (2.17:01), were second and third.
The first Scot to pass the finishing line was Fergus MacLean, in ninth place in two hours 34 minutes and 45 seconds.
More than 4,200 runners from nearly 50 different countries set off from the starting line in Princes Street.
A further 4,700 relay team runners were also signed up to take part.
An estimated 100,000 spectators lined the route, which headed out towards Leith and the Firth of Forth before finishing in Holyrood Park.
But there are doubts about next year's event, with the city council warning it may not be able to bail organisers out financially in future.
The council met this year's £140,000 bill for traffic management costs.
Meanwhile, over on the west coast, around 12,000 women took part in Cancer Research UK's 5km Race for Life on Glasgow Green.