QUESTIONING the attribution of a high-profile painting is a serious business, akin to saying Burns did not write Tam O'Shanter or suggesting that Sean Connery is Albanian. Much is at stake. "There really is no such thing as Art, " wrote the art historian Ernst Gombrich. "There are only artists." Whether one likes it or not, it matters who painted a picture. But what does it take to change the attribution of a painting?

What, say, would you need to do to prove that Leonardo did not paint the Mona Lisa or Van Gogh the Sunflowers or, indeed, Henry Raeburn The Skating Minister, otherwise known as the Reverend Robert Walker? Michael Clarke, director of the National Gallery of Scotland, surrounded by Old Masters, smiles wanly.

"To change it irrevocably, " he says, counting his words as a supermodel does calories, "you'd need to make a pretty convincing case."

A year ago it appeared that at least as far as The Skating Minister was concerned, just such a case had been made. Its proposer was Dr Stephen Lloyd of the Scottish National Portrait Gallery. Writing in the prestigious Burlington Magazine, Lloyd revealed the fruits of several years' research. His findings were devastating and reverberated around the art world.

"I have to rule out all of the Scottish artists, " he says some 12 months on in his office in Edinburgh's Queen Street, "and that's obviously including Henry Raeburn."

Lloyd first began to doubt that Raeburn was The Skating Minister's painter when he looked closely at a painting of the naval hero, Admiral Duncan, which hangs in the Portrait Gallery.

Painted by a Frenchman, Henri-Pierre Danloux, the "grand-manner" portrait of Duncan features among its supporting cast a figure in motion, striking a pose remarkably similar to that of The Skating Minister.

Lloyd's detective snout started to twitch. The more he studied Danloux's portfolio and pored over the details of his life, the more he uncovered other prima facie evidence to support his theory. For instance, at Drumlanrig Castle in the Borders, the seat of the Duke of Buccleuch, he found a pair of "cabinet-sized" portraits of two sergeants in the Dumfriesshire militia whose pose, Lloyd argued, was also similar to that of The Skating Minister.

In his support, Lloyd cited the testimony of other expert witnesses who had raised doubts in the past about the attribution of The Skating Minister to Raeburn, believed by many to be Scotland's greatest painter. Reviewing the last major exhibition of Raeburn's work held in Edinburgh and London in 1997-98, Alex Kitson of the National Trust for England questioned whether The Skating Minister should have been included.

"It has to be said that in the company it keeps here, " he wrote in a review, "it does not look right as a Raeburn at all." Moreover, as Lloyd points out, throughout the Seventies and Eighties, various curators at the National Gallery of Scotland had expressed similar doubts, which first surfaced in an official catalogue in 1970.

Though the painting was always "given" to Raeburn, it was with a serious caveat: "Type of canvas, style of painting and scale of figure have no parallel in Raeburn's work." This, says Lloyd, amounts to "a vote of no confidence" in Raeburn's authorship by the National Gallery in Scotland's most familiar, famous and prized painting. And if a painting previously thought to have been by Raeburn is proved not to have been by him, it can have a deleterious effect on its value and standing.

Similarly, it can make or break careers and may even shake national pride. Scotland is not so rich in artistic masterpieces that it can afford to surrender one which engenders such popular, global affection. Everywhere one looks - on the sides of buses, on mousemats, fridge magnets, ties and scarves, the windows of the Scottish parliament - one sees The Skating Minister, an emblematic, enigmatic figure who seems to sum up the Scottish character, a man dressed as if for a funeral conspicuously enjoying himself.

"I have always understood that Raeburn considered it his masterpiece, " attested Beatrix Scott, the Reverend Robert Walker's greatgranddaughter, "the pose being so good and the lovely frosty atmosphere of the sky and the ice with all the marks of the skates. Dr Walker was a great skater. On his death, Sir Henry Raeburn gave the picture to his widow, Jean Walker, my great grandmother. After her death it came to my mother."

When she gave this sworn testimony to her lawyer, Scott was in her 80s. In attempting to prove who really did paint The Skating Minister, this document is vitally important, a highly detailed account of the history of the ownership of the painting by the sole surviving member of the family of its sitter.

It was forwarded by Christie's, the auctioneers, to the National Galleries of Scotland in 1949 shortly after The Skating Minister was purchased for the relatively modest price of GBP525. In a footnote to his Burlington Magazine article Lloyd said that, "The accuracy of this statement by the elderly Beatrix Scott, regarding the family tradition, has to be treated with some scepticism."

In an interview for a forthcoming BBC2 documentary on The Skating Minister controversy, Lloyd explains why. "To me, it's a neutral, it's a non-specific piece of evidence. It's a piece of evidence that one has to handle very, very carefully. To me, this description is very over-specific. There are statements about it being given by Raeburn to Walker's widow; there's all the business of the 'hissing' ice. It's a rather too elaborate description for an 80-yearold woman. To me, it sounds like a sales pitch."

What is more compelling as far as Lloyd is concerned is the fact that Danloux was in Edinburgh in the last decade of the 18th century when it is believed The Skating Minister was painted. "He travelled there, " he says, "to paint portraits of the French royal family of CharlesPhilippe, comte d'Artois, later Charles X, who was exiled in the debtors' sanctuary of the palace of Holyrood between 1796 and 1803."

At that time the Rev Walker was the senior of two ministers at the Canongate Kirk, situated a few hundred yards from Holyrood, thus adding to the circumstantial evidence that he could have been painted by Danloux. It seems likely that the two men met, but there is no documentary proof of this. Nor is there any proof that Danloux ever met Raeburn. However, in contrast, it is clear that Walker and Raeburn were good friends. Both were members of the Royal Company of Archers, the sovereign's bodyguard while in Scotland, and Raeburn was named one of the nine trustees of the Rev Walker's will when he died in 1808.

All of which adds to the mystery and confusion. But in the wake of Lloyd's Burlington Magazine article, the consensus of opinion seemed to be that Raeburn's claim to be the painter of The Skating Minister had been dealt a potentially lethal blow. From the Metropolitan Museum in New York to the Louvre in Paris and the National Gallery in London, art connoisseurs queued up to offer the opinion that Danloux must be its painter.

"It seems pretty convincing to me!" wrote one eminent museum director. "A wonderful essay, really water-tight as far as I can see, " added another. There was talk that a planned Danloux exhibition must now surely include The Skating Minister.

"I was delighted to hear that you are lecturing on The Skating Minister, " wrote Sir Timothy Clifford, outgoing director-general of the National Galleries of Scotland. "Years ago Alastair Laing suggested to me the attribution of HenriPierre Danloux. I hope you are giving credit where it is due! I share with you the certain knowledge that the picture is not by Raeburn."

And so on to the Danloux bandwagon leapt the press. In the circumstances the National Gallery remained - in public at least - circumspect. Nevertheless, the highly unusual decision was made to redraft the attribution card which is placed alongside the painting.

Though The Skating Minister was still "given" to Raeburn, it was acknowledged that "recent research has suggested that the picture may be by Henri-Pierre Danloux, who spent some time in Edinburgh at the end of the 18th century." There was no attempt to rebut this.

The implication was apparent; Raeburn's claim to be the creator of Scotland's best-loved painting was under threat. Were he on trial he would require an advocate with the eloquence of a Tommy Sheridan to step forward.

The honour fell to Duncan Thomson, former keeper of the National Portrait Gallery and the curator of the last major Raeburn exhibition.

"I've always thought Raeburn painted it, " he says, his faith in Raeburn reinforced by his sporting of a Skating Minister tie. "Many people have had doubts; I've never had the slightest doubt, actually."

Thomson bases his case on the evidence that can be seen on the canvas - the "stylistic features" - and on the provenance of the painting. He insists that Lloyd, his erstwhile protege, is "profoundly mistaken" in reattributing The Skating Minister to Danloux and says his conclusions are "based only on fragile circumstantial evidence and a simplistic reading of only the readily obvious 'narrative' elements of the picture - essentially, the image."

Regarding comparisons between the poses in The Skating Minister and in various portraits by Danloux, including the painting of Admiral Duncan, he says: "I can find nothing in Dr Lloyd's thesis that takes us any further than this incidental similarity; and, indeed, those paintings by Danloux which he illustrates only emphasise, even in reproduction, how in their degree of surface finish, their French neo-classical polish, they differ from the portrait of Walker."

These words are taken from an article which Thomson sent to the Burlington Magazine in response to Lloyd's article and to which as yet he has had no acknowledgement. In particular, he is eager to defend Beatrix Scott's testimony.

As Thomson notes, The Skating Minister made what was probably its first appearance in public when it was reproduced in a Christie's sale advertisement in the Burlington in February 1949. Almost immediately it prompted a letter from Ellis Waterhouse, then newly appointed director of the National Galleries of Scotland, to Christie's, asking if it would be possible to have a photograph of it to show to his board. After further correspondence, it was bought by the NGS and sent north where Waterhouse presciently predicted it "will give a great deal of pleasure". Before the year was out he had arranged the printing of a colour postcard and a larger colour reproduction.

"There is not, " writes Thomson, "a trace of evidence that Waterhouse ever had any doubts that the painting was by Raeburn. There is no need here to rehearse Waterhouse's vast knowledge of both British and European painting, the fineness of his eye and his phenomenal visual memory. The many who knew him will recall how cuttingly honest he could be in matters of attribution and to those who understand the precision of his connoisseurship it will seem extraordinary that, when he made his earliest purchase for the National Gallery of Scotland, he should have confused a French painting for a British one."

Thomson goes on to discuss the details of Beatrix Scott's testimony which he says he has checked and not found wanting. Scott was born in 1846, one of eight children of the Rev Robert Walker's granddaughter, Margaret Scougall, and James Bairnsfather Scott, who married in Edinburgh in 1827. Jean Walker, the Rev Walker's widow, lived until 1831 and would therefore be well known to Margaret Scougall. In her testimony, Beatrix Scott says that the painting in its descent through the family jumped a generation, having been given by Jean Walker to Beatrix's mother Margaret.

Complex as all this may seem, says Thomson, the facts serves to emphasise the relatively brief time-scale with which we are dealing. "They cannot readily be cast aside, and must be judged by what we know from personal experience of the psychology and everyday mechanisms of family tradition and memory. That in such a short period of time the exotic (in a Scottish context) name of Henri-Pierre Danloux should have been lost and replaced by the quotidian Raeburn seems highly unlikely.

Asa corollary of this, the consequence of judging Beatrix Scott's statement substantially wrong would be that she or her predecessors had deliberately falsified the information it contains. This is even more unlikely, even it were possible to a conceive a reason for it. Finally, although not strictly part of this argument, it remains to be asked why Walker should have commissioned a portrait of himself, and a highly unusual one at that, from an expensive French painter when he was an intimate of Raeburn."

We shall return shortly to the question of provenance because substantial new information has recently been found which may finally shed light on the origins of this iconic painting. However, it is perhaps worth returning briefly to the question of style to consider the difference between Raeburn's and Danloux's methods which could hardly be more marked.

Danloux, who was born in Paris, was - as Lloyd attests - trained in the French neoclassical style. In a typical Danloux painting the degree of finish is remarkable with as much attention to detail given to the background as it is to the foreground and the subject. As we have seen, Danloux's method was based on careful planning and preparatory drawing. This was alien to Raeburn who, as far we can tell, did no under-drawing before putting paint on canvas.

At his custom-designed studio in Edinburgh's York Place, with its high, inventively angled, north-facing windows, he would stand as far back from his sitters as possible then, having decided what approach he wanted to make, rush forward and begin spontaneously to paint.

One sitter commented: "I had sat to other artists; their way was quite different - they made an outline carefully in chalk, measured it with compasses, placed the canvas close to me, and looking at me almost without ceasing in the face, proceeded to fill up the outline with colour. They succeeded best in the minute detail - Raeburn best in the general result of the expression; they obtained by means of a multitude of little touches what he found by broader masses; they gave more of the man - he gave most of the mind." What this anonymous person is essentially describing is the intrinsic difference between Raeburn and Danloux. In essence, Raeburn describes and Danloux imitates.

The contrast in the two painters' modus operandi could not be clearer, argues Duncan Thomson, tracing his fingers round The Skating Minister's hat. What is immediately visible to viewers of the actual picture is the faint outline of a hat, which had been painted over. It is what's known technically as 'pentimento', the revealing of a part of a painting beneath another painted over it at a later time, a common feature of oil painting.

"Such evidence of changes, " says Thomson, "the result of method and technique, are a common feature in Raeburn's work, but quite foreign to anything found in Danloux.

They are essentially the result of Raeburn's unpremeditated, empirical way of working, which is diametrically opposed to Danloux's method, which is so much based on preparatory drawing and careful pre-planning that marked changes of this sort were never necessary."

Changes of mind, concedes Stephen Lloyd, are typical of Raeburn but not of Danloux, and the pentimento is "a puzzle in the picture". It is an area fraught with contention and may never befully resolved until both painters' work has been subject to infra-red examination. Infra-red examination of The Skating Minister has revealed no preparatory drawing but none of the Danloux paintings mentioned above has been similarly studied. Style alone, then, cannot at the moment tell us conclusively who painted The Skating Minister.

But what of the history of the painting's ownership? If only there were a document confirming who the painter was. Neither Raeburn's nor Danloux's signature is on the canvas, and neither painter left a record of his sitters. Danloux kept a diary but, frustratingly, the pages pertaining to his sojourn in Scotland are missing. We must return, therefore, to Beatrix Scott's sworn testimony, in which we were told that Raeburn gave the painting to the Rev Robert Walker's widow, Jean, on his death. Is there any record in the archives of the painting in her will? This hitherto unseen document, which is stored in New Register House, just off Princes Street, reveals that Jean Walker instructed her trustees to deliver to her granddaughter - also called Jean Walker - "all the portraits of which I may die possessed."

If only she had specified how many portraits there were and of whom! But what the Rev Walker's widow's will does confirm is the unerring accuracy of Beatrix Scott's testimony.

In the event of her granddaughter Jean predeceasing her - as in fact appears to have happened - Mrs Walker specified that "the whole shares of my said estate" should go to another of her granddaughters - Margaret Scougall - which is exactly how Miss Scott described the chain of events which brought the painting of The Skating Minister into her possession.

There is, however, a further tantalising twist to this hydra-headed family saga. On November 14, 1896, Lot 91 came up for sale at Dowell's auction house in George Street in Edinburgh. Described as a "Portrait of the late Dr Walker" by Sir Henry Raeburn it sold to an anonymous buyer for GBP37 16/6. This painting is mentioned in a footnote to Lloyd's Burlington Magazine article where he surmises that it "is likely to have been a conventional head-and-shoulders or half-length format". But what he was unable to reveal is that this now missing painting was brought to auction by Cowan and Dalmahoy, the family lawyers to the Walker family and its heirs, thus strengthening the connection between Raeburn and the man who was The Skating Minister.

Who knows whether in court such evidence would prove persuasive. Shown it, Lloyd looks bemused: "I'm slightly puzzled, I must say. I do think it's very compelling. It does add up. It does make sense. Definitely. And also - because Raeburn died in 1823 and the Rev Robert Walker died in 1808 - to have the two together in the same description of the painting does increase the chances that it is of our man, the Rev Robert Walker. And it does strengthen the case that Raeburn did paint the portrait of the Rev Robert Walker."

The painting to which Lloyd is referring, however, is not The Skating Minister but the more conventional, head-and-shoulders portrait of which Raeburn painted hundreds.

Thus Danloux's advocate remains sceptical of the Raeburn attribution. Others, though, now seem to believe that the pendulum has swung back in favour of the man described by the author and minister, Hugh Blair, as "our great painter here".

Weighing up the balance of possibilities, Michael Clarke sums up: "If I can put it this way, ifit's by Raeburn, he's painting in a format favoured by Danloux. But if it's by Danloux, he's painting in a style practised by Raeburn. Now, it's more likely to my mind that you could paint in an another artist's format than paint in a style which is really quite different from the rest of your work."

Such are the sentiments of the man responsible for The Skating Minister's safekeeping. On the 250th anniversary of Sir Henry Raeburn's birth, is it too much to ask that his "masterpiece" should be given unconditionally back to him?

Who Painted The Skating Minister? was made by Leman Productions, and will be shown on BBC2 at 7pm next Sunday, August 27