Concerns over the diversity of elected representatives at Holyrood have been raised by MSPs in the Scottish Parliament's 20th anniversary year.

Moves towards getting more women and people from ethnic minorities into the Edinburgh-based parliament have, in some ways "gone backwards", it was claimed in a new BBC Scotland documentary on devolution.

Despite the prevalence of female leaders in the Scottish Parliament, the 2016 Holyrood election returned fewer women than there were at the first election in 1999.

In two decades, the parliament has had just four MSPs from ethnic minority backgrounds.

SNP MSP Linda Fabiani, who has been in the Edinburgh parliament from the start, told the programme, entitled Children Of The Devolution: "If you say that a parliament should reflect the people that it serves, I think we do that in quite a lot of ways.

"We're not quite there yet with equality for women and we're certainly not there yet with other equalities that we need to take notice of. But the will is there."

Labour MSP Iain Gray, who was also first elected to Holyrood in 1999, said: "We've never had a black woman MSP, that's never happened in 20 years. In some ways we've gone backwards."

Meanwhile, Labour MSP Anas Sarwar, who last year set up a Cross Party Group on tackling Islamophobia, said Scotland still has a long way to go on equalities issues.

Mr Sarwar told the programme: "You come to the realisation at some point - and part of it is when you become a parent yourself and you see the challenges that your children might face in the future - that I can't stay silent, silence isn't an option any more.

"I genuinely believe that my children are going to grow up in a more divided and a more hate-filled world than the one I grew up in and that frightens the life out of me.

"And I think we need people of all backgrounds talking about (it), and we all care about Scotland and we've got a long, long way to go."

The first episode of the documentary reflected primarily on the early years in the life of the new Scottish Parliament, which was formally opened by the Queen on July 1 1999.

One early controversy also centred around the issue of equality - moves by the Labour/Lib Dem executive to scrap the controversial Section 28 or clause 2A law which banned the "promotion" of homosexuality in schools.

A high-profile campaign to keep the clause was led by businessman Sir Brian Souter, who funded a postal referendum on the issue.

After months of bitter political argument, MSPs voted to repeal the law in June 2000.

Scottish Conservative leader Ruth Davidson said: "I really hated that idea that one rich person could have ownership over a whole idea, it really brought home to me that it is not always a fair playing field and that really stuck in my craw."

She added: "I almost got caught by police tearing down a poster. I do remember it being a time of inflamed tension.

"I remember a number of my friends sending very heavy items to the freepost address, including a fridge and two short planks."

Ms Davidson also reflected on the 2014 law change that would allow same-sex couples to marry in Scotland.

"When the bill was finally passed, I went back up the stairs to my office and I burst into tears," she told the BBC.

"After that, very late on, I went to a get-together in the pub with some of the campaigners and through a weird series of events someone there put me in touch with the person who is now my fiancee, so it almost started another chapter of my life.

"This has made very little change to the vast majority of people's lives, but to the people whose life it has changed it has made all the change in the world."

A Scottish Parliament spokeswoman said: "The Presiding Officer is already on the record about the lack of progress that has been made regarding the number of female MSPs and committing the Parliament to work with the political parties to address this concern.

"He has also supported moves to encourage greater numbers of disabled and BAME MSPs so that we have a Parliament that is reflective of the communities that it serves.

"The Parliament will do what it can to implement the recommendations of the Commission on Parliamentary Reform which called for greater gender balance and a more diverse Parliament."

Episode one of Children Of The Devolution is on BBC Scotland at 10pm on Tuesday.