A hospital kept dozens of patients in accident and emergency for up to 17 hours because of a "surge in demand" for care following the Easter weekend, MSPs have been told.

Health Secretary Shona Robison was pressed on reports the Royal Infirmary of Edinburgh (RIE) had 36 patients in its A&E department waiting to be admitted.

Liberal Democrat health spokesman Alex Cole-Hamilton said there were "potential safety implications" for patients as a result.

Ms Robison said: "Occasionally, particular A&E departments will experience a surge in demand that will happen for a variety of reasons.

"At the RIE, the issue was a post-Easter surge in demand, with high levels of attendances on Thursday April 20.

"What they then do is what any emergency department will do, they ask for beds to be released as quickly as possible."

She insisted performance at the hospital had "returned to normal within a few hours of that surge".

The Health Secretary said: "The performance of that hospital in a steady state has been a very good one but they did experience a surge in demand.

"That was managed appropriately and they did return to a steady state very quickly after that."

Mr Cole-Hamilton also asked about staffing at the Queen Elizabeth University Hospital in Glasgow, which is the focus of the BBC documentary Scotland's Superhospital.

Workers at the facility are "incredibly stressed and the hospital is very short-staffed", the Lib Dem MSP said.

The Royal College of Nursing trade union has also raised concerns this "makes it really hard to deliver care" and puts a "real strain on services", he added.

Ms Robison paid tribute to the "unstinting professionalism and dedication exhibited by the staff at the Queen Elizabeth University Hospital".

She also welcomed the "very positive documentary that the BBC showed last night about the hard-working staff within our Queen Elizabeth University Hospital".

Labour's Anas Sarwar joined the attack and said: "The reality is our NHS staff are overworked, undervalued and under-resourced by this SNP government."

Ms Robison stressed: "All NHS boards, including NHS Greater Glasgow and Clyde, have a statutory responsibility to carry out and actively monitor workforce planning.

"This ensures that high-quality services continue to be delivered safely while boards remain responsive to the needs of staff.

"Under this government, the number of staff in NHS Greater Glasgow and Clyde is up 3.7% to 34,385 whole time equivalent, with consultants up 38.4% and qualified nurses and midwives up by 5.5%."