A former lawyer has lost his £4.25 million damages claim against an aristocrat over the return of a stolen masterpiece.

Ronald Marshall had raised an action against the Duke of Buccleuch after he was cleared with four other men at the High Court in Edinburgh in 2010 of conspiring to extort money following the theft of da Vinci's Madonna of the Yarnwinder painting from the family seat.

The Da Vinci was recovered in a police raid in October 2007 in the offices of a law firm in Glasgow after Mr Ronald, of Upholland, Lancashire, sent a message to an undercover officer stating: "The Lady is coming home."

Mr Ronald claimed in the civil action that the duke provided a letter of authority confirming that the officer, known as John Craig, acted as his agent in the recovery of the painting and was authorised to conduct negotiations.

His lawyers claimed there was an agreement for £4.25m to paid to him for his role in securing the return of the masterpiece. He said this was made by Mr Craig acting on behalf of the duke.

The duke maintained in the action that Mr Craig had no actual authority to enter any agreement or negotiate on his behalf.

After a hearing at the Court of Session in Edinburgh, a judge rejected the claim brought by Mr Marshall.

The duke said: "I am very pleased that Lord Brailsford has issued an unequivocal judgement in my favour in which he found that the pursuer's case was entirely inconsistent with the evidence that he heard.

"The theft of the Madonna of the Yarnwinder painting was deeply disturbing for my family and it is a matter of regret that court proceedings have continued over so many years.

"As was made clear in the evidence of three retired police officers as well as my own, my involvement in supporting the 'sting' operation which involved an undercover police officer was entirely at the request of and under the direction of the police.

"The suggestion that, in doing what I did, I was somehow entering into an arrangement which could have been illegal has been absurd and I regret the waste of time and money that it has involved"

The Madonna of the Yarnwinder has since been loaned to the National Gallery of Scotland.