Former US Secretary of State Hillary Clinton gave an impassioned speech emphasising the importance of standing up for gay rights on receiving an honourary doctorate from St Andrews University.

Mrs Clinton, officially announced her support for equal marriage in a moving speech back in March in which she called moves towards equality “breathtaking and inspiring”.

In the speech during her first foreign visit since her term as Secretary of State ended in February, Mrs Clinton spoke to the audience of education leaders to say: “We need more voices speaking up for universal human rights.

She said: “We have honoured some of the great advocates here today who have spoken out courageously for women’s rights, gay rights and religious understanding, showing us that our communities and institutions are strongest when equality and opportunity are open to all people and freedom of conscience is respected.

“Here in the home of the Scottish Enlightenment and the great contributions from Scottish universities, we need to be reminded that it paved the way for much of the progress we now take for granted, not only in the West but around the world.

“And it is important that as we chart our way forward in this new century, we bring with it the enlightened view that every individual around the world regardless of gender, religion, race, ethnicity or orientation, should be able to contribute to their societies and to have the chance to live up to his or her God given potential.

“We are confronting deep cultural and political differences. Change can be very wrenching and it is difficult to bridge the gaps between and within societies.

“We will never agree on everything….but spirited and principled debate is the lifeblood of democracies and today our democracies are under stress.

“It is more important than ever that we rally behind what started here and elsewhere, where the individual was endowed by his creator with those rights that enabled first men and slowly women and others to be full participants in their society.

“Now we need in this new age participation on a much grander scale to make the case for the importance of those fundamental values.”

Mrs Clinton, who travelled without husban Bill or daughter Chelsea, was given the doctor of laws degree in recognition of her work as a politician and diplomat, reports the Associated Press. She received the award from Liberal Democrat politician and St Andrews chancellor Sir Menzies Campbell.

Also receiving an honourary degree was former Archbishop of Canterbury Rowan Williams, who last month admitted that he regularly questioned whether he had let gay and lesbian people down during his time in post.

As Archbishop in October 2012 Dr Williams admitted that the Church of England’s attitude to gay relationships had often been harmful to people on the receiving end of its message.

In the previous month Dr Williams said that while the Church was “wrong” not to have advocated gay equality, Prime Minister David Cameron was wrong to have embarrassed the Church of England over the issue of equal marriage.