Waiting times in Scotland's accident and emergency (A&E) wards are "not as good as we need them to be", the health secretary has said.

A total of 87.8% of patients were admitted, transferred or discharged in four hours in the week ending December 16 - the second worst figure in the past eight months.

It falls short of the Scottish Government target that 95% of A&E patients should be seen within four hours, which has not been met since July 2017.

There were 26,110 attendances to Scots emergency wards in the seven-day period, with 3195 patients (12.2%) having to wait longer than four hours to be seen.

Of those, 315 (1.2%) waited more than eight hours, and 53 patients (0.2%) were made to wait more than 12 hours.

The figures are an improvement on the same week last year, when a flu outbreak meant only 81.1% of people were seen within the four-hour window.

Across health boards, NHS Shetland performed best, with 100% of patients seen within the four-hour timeframe, while NHS Tayside and NHS Highland also met the government's benchmark, on 96.2% and 95.8% respectively.

The worst-performing health board is NHS Forth Valley, with only 64.9% of A&E patients seen within four hours.

Overall since 2016, A&E waiting times have been slipping further from the government's target, with an average of 93.2% seen within four hours in 2016, 92.2% in 2017 and 89.5% so far this year.

Speaking to STV News, health secretary Jeane Freeman pointed to a spike in demand in A&E wards in recent years as one of the factors behind the dip.

She said: "The figures continue to be not as good as we need them to be.

"We're still not meeting the target across all of our emergency departments in Scotland.

"We're holding steady in many places which, in the face of rising demand - and there has been significant rising demand - is a reasonable result but it's not good enough.

"I know that colleagues in those emergency departments, the doctors, nurses and others themselves, want to do even better.

"That's why some of the work we're putting in, some of the additional resources, our waiting times improvement plan, is all designed to increase that performance and improve it over the coming months."

Freeman added: "(Between 2016 and this year) attendances have increased somewhere between 8.5% and 12.5% - in some places up to 20% - more people going to A&E.

"So it's not just about what happens in A&E, it's also about what happens in our out-of-hours service, in our minor injuries and minor ailments service."

The health secretary said £850m had been set aside over 30 months to improve waiting times, for A&E departments as well as for cancer patients and diagnostics and elective surgery such as for hips, knees and cataracts.

"That £850m will be used where it is most needed... it's very targeted work," she said.

"I'm not going to spread it thinly across the whole of Scotland. I'm going to target it where it's most needed in order to bring down those waiting times."

A spokeswoman for NHS Forth Valley said: "We have experienced recent challenges in meeting the four-hour A&E waiting times target and are working hard to improve our performance in this area.

"Patients with more urgent or serious health issues are prioritised, to ensure they are seen and treated as quickly as possible.

"NHS Forth Valley has also received £17m of addition funding to help reduce delays for local patients.

"This will be used to create a new 32-bed ward, purchase a new MRI scanner and open two additional operating theatres to help increase capacity."