Labour yesterday called for Scotland's law officers, newly appointed by First Minister Alex Salmond, to issue guidance to sheriffs throughout Scotland to make sure they understand the right-to-roam legislation.

The urgent call came a day after a sheriff ruled that Ann Gloag, the Stagecoach multimillionaire, had a right to block ramblers from using a 12-acre site around her home at Kinfauns Castle near Perth.

Labour, who took credit for driving the land access legislation through the Scottish Parliament in 2003, reacted sharply to the sheriff's ruling. Rhona Brankin, the rural affairs and enterprise spokeswoman, said Lord Advocate Elish Angiolini and Solicitor General Frank Mulholland should get involved to ensure the law is applied as MSPs had intended. That involves application of the access code drawn up by Scottish Natural Heritage.

She said: "Labour believes that advice needs to be given by the law officers of the executive to all sheriffs in Scotland to emphasise to them that the Scottish Outdoor Access Code is an integral part of the land reform legislation and has to be taken into account in all relevant court cases."

In a debate on Scotland's environment, she explained: "It clearly was the intention of the parliament that the code was to be used as a reference point in such actions and it is extremely disappointing that the sheriff in the Ann Gloag case has not taken adequate account of the code and especially the advice (in it relating) to the taking of access in the land surrounding large houses."

She said she wanted the newly formed Rural Affairs and Environment Committee to tackle the issue urgently, to examine whether the existing legislation could be made to work better or if it needed amended.

On Tuesday, Sheriff Michael Fletcher issued a 34-page ruling that the access code was biased towards those wanting access, and ruled that Mrs Gloag was entitled under human rights law to privacy around her home. She had lodged the legal action to assert her right to bar people from a 12-acre area in the castle's 28-acre grounds. It was contested by the Ramblers Association and Perth and Kinross Council, which could appeal.

Environment Minister Michael Russell said the executive was "wholly committed" to the right of responsible access under the 2003 law. "We will adjust the provisions if experience suggests that that is necessary to secure parliament's intentions," he said.

Ministers' responses are being closely watched by opponents in light of the £500,000 campaign donation to the SNP from Ms Gloag's brother, Brian Souter, who co-founded the Stagecoach transport company with her.

Roseanna Cunningham, convener of the Rural Affairs and Environment Committee, backed calls to apply the law as intended. "The responsible right to roam has been hard won and I am extremely concerned that a sheriff should appear to have blithely set aside that right," she said.

John Scott, the Tory rural affairs spokesman and a farmer, supported the ruling about Mrs Gloag's 7ft high fence around Kinfauns Castle and said the land she had cordoned off was "not an unreasonable area of land to regard as the private area around for a castle of this size".

LibDem spokesman Mike Rumbles urged caution on those who want to see the law reviewed, pointing out a large proportion of it had yet to be implemented.

Meanwhile, Jackie McCreery, of the Scottish Rural Property and Business Association, said a review would be an over-reaction: "This case simply highlights that both access takers and home owners have rights which must both be respected. Landowners will certainly not be going out en mass erecting fences in the countryside, as some suggested."

Your questions answered What was the purpose of the Land Reform (Scotland) Act 2003?

The act established statutory rights of access to land and water and, in addition, provides opportunities for local communities and crofters to acquire land and water through right-to-buy provisions.

If one of the act's aims was to increase access rights to the Scottish countryside, why was Ann Gloag successful in having her Perthshire estate exempted from the legislation?

Section 6 of the act defines land over which access rights are not exercisable. Among them is land around a private dwelling. It states that in relation to houses "sufficient adjacent land to enable persons living there to have reasonable measures of privacy in that house or place and to ensure their enjoyment of that house or place is not unreasonably disturbed" is exempted.

How did Sheriff Michael Fletcher decide what amounted to "sufficient" land?

Section 7 of the act provides some guidance. It states that among the factors which go to determine what extent of land is sufficient are "the location and other characteristics of the house or other place".

What is meant by "other characteristics"?

No-one quite knows. In his written judgment Sheriff Fletcher said that the provisions in Section 7 "are extremely general and no help is given as to what is meant for instance by other characteristics'." The sheriff said that the "other characteristics" he took into account in reaching his decision included the fact that the house is an "exceptional country mansion house of high architectural merit", that it is "of a very substantial value such that only a small number of persons would be able to afford to own it and run it as a private house" and as such it required "a larger rather than smaller area of ground" to satisfy Section 6 of the act.

Does this mean the larger the house, the more privacy a person can expect and demand?

It would appear so. Robert Rennie, professor of conveyancing at the University of Glasgow, said: "Even before this decision it seemed obvious to me that if you had a castle or mansion house on a landed estate then you were going to be entitled to a larger area of land for privacy purposes.

"I think the view that the sheriff has obviously taken is that if it is a castle you have, you are entitled to a far larger tract of privacy than if it is a bog-standard semi in a suburb."

So the wealthier you are, the more protection you are afforded?

Jeremy Rowan Robinson, emeritus professor of law at the University of Aberdeen, believes so. He said: "It was always intended from the very beginning that people should have privacy for their houses, but it is the extent of that exception which is the issue. (The Gloag case) raises an interesting question as it suggests that wealthy people with large houses require larger areas of privacy."

Will the Gloag case result in a rush of landowners seeking exemptions for their estates?

According to Professor Rowan Robinson, yes. He said: "What this particular decision is going to do is create a gap through which I think quite a number of people with large grounds are going to go through. There are a number of other cases in the pipeline and I expect there will be more in light of this decision. I think it is going to open the door to other actions for declaration that certain land is not land subject to access rights."

However, Mr Rennie does not believe the case will have far-reaching ramifications. He said: "It would be wrong to view individual cases like this as setting a precedent for other cases, because each case is going to have to be taken on its own facts. Different factors will apply in different cases."