Ewan, Jamie and Lachlan Maclean, from Edinburgh, sailed for 139 days across 9,000 miles of the Pacific Ocean.

The trio took on the challenge unsupported and took enough food and supplies on board with them to last the duration of the trip.

After arriving home in Scotland on Wednesday, the brothers announced they have reached their £1 million target, with the money funding their charity the Maclean Foundation’s work to provide clean water for around 40,000 people in Madagascar.

The brothers have received more than 14,000 donations, with their campaign bolstered by a number of celebrity endorsements, including from Ewan McGregor, Sam Heughan, Ally McCoist, Mark Wahlberg, Lorraine Kelly and Anna Campbell Jones.

Nearly £60,000 was donated in the final 24 hours before they landed in Scotland, and the £1 million target was passed at around 8am on Wednesday when Cairngorm Coffee, run by the brothers’ cousin Robie Lambie, added £1,500 raised through sales of its limited-edition Sweet Valley coffee.

Middle brother Jamie, 31, said: “We are blown away by the way people who have rallied behind us, not just here in Scotland but from all over the world. The support at every stage of this journey has been incredible.

“To come home having reached £1 million is something we never imagined when we first set out. Knowing that this will change 40,000 lives with access to clean, safe water is the greatest reward we could have asked for.”

Youngest brother Lachlan, who turned 27 while at sea, added: “This feels truly monumental. We are deeply grateful to every single person who has backed us.

Lachlan, Jamie and Ewan Maclean smiling while in their rowing boatLachlan, Jamie and Ewan Maclean pictured at sea during their 9,000-mile trip (The Maclean brothers/PA)

“Access to clean water is a basic human need, yet for so many communities in rural Madagascar it remains out of reach.

“To know that 40,000 people will now have safe water for life is life-changing. It makes every mile we rowed worth it, and we couldn’t be prouder of what this support will achieve.

“We are so grateful to all the friends and family who came out to see us in at Cairns Marlin Marina (Australia) just over one week ago, and are so pleased to be back home in Edinburgh with those who weren’t able to make it out, including our dad, who we started this charity alongside.”

Wahlberg has told the brothers he wants to play all three of them in a movie about their journey.

While in the middle of the Pacific, Jamie played the bagpipes virtually with the All-American Rejects and to McGregor.

Donations can still be made at https://www.themacleanbrothers.com/.