Regulators have ruled that a fee-paying school should continue to enjoy charitable status.
The High School of Dundee was assessed by the regulator
The Office of the Scottish Charity Regulator (OSCR) decided that the High School of Dundee meets a new "public benefit" assessment.
The case was the first of its kind since new legislation was introduced by the Scottish Parliament in 2006.
Under the rules, charities must be able to demonstrate they have a charitable aim and benefit the public.
The High School of Dundee, whose fees range from £5,841 to £8,304 a year, qualifies due to the range of bursaries and access to its facilities offered to the local community.
But of the other 16 organisations studied under the new regulations, John Wheatley College in Glasgow and the Voluntary Action Fund, fell foul of rules regarding the wording of their constitutions.
OSCR chief executive Jane Ryder said the regulator reached the ruling after taking into account the High School of Dundee's wider community benefits.
She said: "There was in Dundee's case a certain amount of local and national benefit which wasn't charged for.
"What we looked at was those benefits against those that are charged for, in this case they made facilities available to local groups and they support the national curriculum."
She added that a key feature was how widely available bursaries were, with around 13% of pupils receiving some kind of financial support.
Mike Duncan, rector of the High School, said he was delighted with the ruling.
He added: "Our status as a charity will ensure that we can continue to support the advancement of education within our local community and beyond.
"Most importantly of all, it will enable us to continue to offer financial assistance to support those pupils who without that help may otherwise be unable to attend."
The regulator will now continue assessing each of the country's 59 independent schools on a "case by case" basis.
The 16 groups which volunteered to be studied under the first round of pilot reviews also included miners' welfare societies, museums, a church, playgroups and a university.
The Scottish Council for Voluntary Organisations (SCVO) chief executive, Martin Sime said described the assessment process as important for Scotland's charities.
He added: "On the issue of fee paying schools, it remains to be seen whether the confirmation that Dundee High School meets the charity test will set a benchmark for community benefit and assisted access, or be the thin end of the wedge for schools who have higher fees and offer fewer benefits to their communities."
Regulators will now press on with assessing the 23,500 groups already registered when the watchdog was set up.