THE last seven years have been arguably some of the most important in the history of Scotland's oldest university. Recent times have been troubling for higher education north of the border, with fears over future levels of public funding and the impact of top-up tuition fees in England casting a long shadow over the immediate future.

Yet, throughout this period, one of the undoubted success stories has been the development of St Andrews under current principal Dr Brian Lang.

Aside from the small matter of educating the country's future king, when Mr Lang arrived at the university in 2001 it ranked 20th in the UK league tables. Today, a few months before he steps down, it is fifth, behind Oxford, Cambridge, Imperial College and the London School of Economics.

However, what the university has been less well-known for in its 600-year history is the wide social mix of its students, with a long-standing reputation for admitting large numbers of applicants from English public schools, as well as students from America.

At his installation in 2001, Mr Lang said he was committed to social inclusion, stating: "Social mix must become as much a feature of the experience of St Andrews as the cosmopolitan mix for which we are well known." However, despite hard work in the surrounding areas of Fife to encourage more state school pupils from deprived areas, the proportion of its students from the comprehensive system has remained unchanged.

According to figures from the Higher Education Statistics Agency, the proportion of school-leavers at St Andrews from the state sector last year was 59%, compared to 62% in 2002-03. The most recent figures compare with 68% from state schools at Edinburgh University and 86% at Glasgow University.

However, the record of St Andrews is better when considering the proportion of pupils from designated low participation neighbourhoods. Figures produced for the first time this year show St Andrews has 2.9%, a higher proportion than any other Ancient university in Scotland.

For Mr Lang, a social anthropology graduate of Edinburgh University, there is a link between the institution's impressive rise through the ranks and the fact there has been no headline- grabbing progress in widening access.

While some institutions have seen positive discrimination as a crucial tool to give talented, but disadvantaged, students access to the best seats of learning in the land, Mr Lang believes such a strategy ultimately damages universities.

"One of the reasons why we have been so successful is that we have not compromised on excellence," he said. "We subscribe utterly to the wish to bring a more diverse student population to St Andrews, but it is fundamental to us that anyone who comes to St Andrews must contribute to the enhancement of the intellectual experience of this university.

"As far as students are concerned, it is our task to identify those people in Scotland who will do well by coming here and recruit them no matter their background, but we don't do any academic favours to people."

In common with other universities, St Andrews runs a series of outreach programmes to state schools in Dunfermline, which it plans to expand, and also operates a summer school to familiarise pupils with the institution and take away some of the mystique that surrounds it.

As part of the commitment to widening access, St Andrews also operates a scheme where state school students who "narrowly miss" their entry grades, are given a second chance in the university's summer school. If they succeed in convincing staff they are capable of flourishing at the university, they are guaranteed a place in first year.

"If there is positive discrimination, then it has been looking again at those who miss out marginally and taking them in to our summer school to have another chance, but it doesn't mean we have lowered the barrier," said Mr Lang.

"In bringing them into the summer school they have to demonstrate they can cope with a St Andrews undergraduate course and I think that is looking carefully to find people who can make a success of their time here.

"No admissions process will ever be deemed fair, and there will be those that say applicants from the independent sector are at an advantage, but our task is to be fair and transparent."

Another key element of Mr Lang's thinking on widening access is his view that the university sector in Scotland is not homogenous.

He welcomed recent pronouncements from the Scottish Funding Council which made a distinction between universities that select students and those that recruit and believes it is wrong to try to force all universities to do the same thing.

"There is increasing recognition that there is a difference between universities and they contribute in different ways," he said. "What we deliver is high quality research, giving Scotland an international role, contributing to economic growth and producing well-educated students."

Mr Lang also holds forthright views on student debt. He believes the funding of universities in future will have to be bolstered by donations and endowment funds along the lines of the American model but says there is still some way to go to make this a reality because the UK does not have a history of philanthropic giving to higher education. He also believes the understanding students have of the debts they accrue at university should be seen in a wider context.

"The increased earning power of the degree is very significant," he said. "There is a very strange attitude to student debt in Britain. Students leave university with a very substantial debt and that is not pleasant and would not exist in an ideal world, but that degree which the debt has paid for allows that person to take out a huge mortgage.

"A student may baulk at a £15,000 education debt but that debt lets them go out and borrow a much more substantial sum of money which they don't baulk at. It also funds a lifetime and a lifestyle which is of a significantly higher quality than would otherwise be the case. If I was starting again I would gulp at a £15,000 debt but I would probably do it and at the end of my life I would say it was a good investment."

No current discussion of the future funding of higher education can avoid the topic of top-up tuition fees in England, and the impact on Scottish universities if the current cap is lifted. Institutions north of the border fear that, with the extra earning power, they will fall behind their competitors - one of the topics of discussion in the ongoing Scottish Government taskforce on the future of the sector.

Mr Lang does not subscribe to talk of a "crisis", and also disputes oft-quoted remarks that he is in favour of the introduction of top-up fees in Scotland but he does believe there is a serious discussion to be had about long-term sustainability.

"I have never called for tuition fees and I have never called for a graduate tax. What I said was that there were various ways of funding universities and we have to think about all of the options and, whether it is more money from the taxpayer or through top-up fees, it has to ensure our universities are properly resourced," he said. "The issue is not whether we are in financial hardship now - we have done very well this year from the funding council - the issue is not the next two or three years, but future competitiveness and long-term sustainability.

"There is a taskforce which is addressing the issue and the government knows what the issues are. The universities have been very clear in putting forward their case and I think we all await with interest the report of the joint working party."

After stepping down from St Andrews, Mr Lang intends to live and work mainly from Edinburgh, where he has a house, although he will also base himself for part of the time at his apartment in London.

Describing himself as "certainly not ready for the pipe and slippers yet", he reveals that Prime Minister Gordon Brown, "bless him", has already re-appointed him as deputy chair of the Heritage Lottery Fund and he has also been nominated chair of the Royal Scottish National Orchestra. "That will keep me busy," he said.

However, as far as higher education is concerned, he will draw a line under his involvement.

"I think that would be wrong for the time being," he said.