Marshall Ronald, 53, had become obsessed with recovering Leonardo da Vinci's Madonna of the Yarnwinder and it was the most important thing in his life, a jury was told.
While the police had effectively given up looking for the masterpiece, Ronald set about securing its release and it was now on display in the National Gallery of Scotland, defence QC, Donald Findlay, said.
"The person principally responsible for the return of the painting is Marshall Ronald," said Mr Findlay, calling the alleged plot "fundamentally bizarre".
Ronald, a solicitor, of Skelmersdale, Lancashire, is accused of conspiring in 2007 with two clients, Robert Graham, 57, and John Doyle, 61, both of Ormskirk, Lancashire, and two Glasgow-based solicitors, Calum Jones, 45, and David Boyce, 63, to extort 4.25m for the return of the painting.
The 20m Madonna of the Yarnwinder was stolen four years earlier from the Duke of Buccleuch's Drumlanrig Castle in Dumfriesshire. It was recovered on 4 October, 2007, when detectives raided a meeting in a Glasgow law firm's offices.
In his closing speech at the High Court in Edinburgh, Mr Findlay, for Ronald, said: "In the summer of 2007 Dumfries and Galloway constabulary did not have a clue where Madonna of the Yarnwinder was to be found … no-one was lifting a finger to try to find the painting.
"At that stage, Marshall Ronald was approached by two clients, Mr Graham and Mr Doyle. They came to him with a piece of information, essentially that they may be able to track down an apparently well-known stolen painting. They asked a question: what can we do about this? There begins a chain of events which results in two important events.
"First, Marshall Ronald is in this court … secondly, the painting has been returned to its lawful owner. Whatever else anybody may say, it is a fact that but for the efforts of Marshall Ronald, that painting would not be back with the Duke of Buccleuch today."
The Crown alleges that Ronald negotiated with an undercover policeman posing as a representative of the duke, and agreed a 2m payment which was to be shared by those holding the painting, two intermediaries, Ronald, Graham and Doyle.
It is also claimed he struck a side deal for himself in which he was to be paid 2.25m He used 350,000 of a client's money to secure the release of the painting. Mr Findlay told the jury there was no shying away from the fact that Ronald had done things which were wrong, in particular using the client's money.
"But that does not make him an extortionist. Marshall Ronald became obsessed. He took his eye off the ball. It was a once-in-a-lifetime opportunity and he allowed himself to be totally swayed, consumed and blinded."
Mr Findlay said there had been no threat that the painting would not be returned unless money was paid, and he suggested "something fundamentally bizarre" in the notion of three lawyers sitting down and conspiring to extort money. The trial continues.