Scotland's accident and emergency departments have missed government waiting times targets for two straight years.

The Scottish Government's target is for 95% of A&E patients to be either admitted, transferred or discharged within four hours.

However, it has not met this target since August 2017.

In August this year, 90.6% of patients were dealt with in four hours or less, with A&E staff dealing 152,353 cases over the course of the month, the latest official statistics show.

A total of 1406 patients spent more than eight hours waiting in A&E to be seen, while 354 were forced to wait for more than 12 hours.

Scottish Labour branded the two-year failure to meet the target "utterly shameful and completely inexcusable".

But the Scottish Government defended NHS Scotland's record, saying it has the best-performing A&E services in the UK.

The Scottish Liberal Democrats leapt on figures for the week ending September 22, which showed 86.9% of patients were treated with the four-hour timeframe - the worst weekly performance since February, the party said.

It comes after NHS Lanarkshire warned patients not to attend A&E wards if they do not require emergency treatment.

The health board said people wrongly attending emergency wards was putting "immense pressure" on services, with a new policy to redirect such patients now in place.

Labour's health spokeswoman Monica Lennon said: "Jeane Freeman was handpicked by Nicola Sturgeon to turnaround the bad record of the former health secretary but our precious NHS is struggling like never before.

"It is utterly shameful and completely inexcusable that the A&E waiting time target has not been met in two whole years.

"Over the weekend health boards have been begging sick and injured people not to attend A&E unless they have very serious symptoms.

"The public must use our NHS responsibly but the figures don't lie."

She added: "It is clear that SNP ministers simply don't have a remedy for the problems they have created over the last 12 years."

Lib Dem health spokesman Alex-Cole Hamilton said: "The SNP made a song and dance about producing a waiting times plan but it doesn't seem to be having an impact.

"Waits at A&E are now worse. Nearly 4000 patients waited longer than expected last week, including more than 300 waiting over eight hours.

"Staff and patients have every right to demand better."

Defending the government's record, health secretary Jeane Freeman said: "NHS Scotland funding is at a record high, supporting a historically high number of staff delivering care to the people of Scotland.

"Despite substantially increased attendances at our A&Es, around nine in ten people are still being seen, treated, or discharged within four hours of going to A&E.

"Scotland's A&Es have been the best performing A&Es anywhere in the UK for over four years, with our core A&Es in August being 10.5% higher than in NHS England, and 17.6% higher than in NHS Wales.

"But we want to go further, that's why I brought forward the £850m waiting times improvement plan to help increase capacity and efficiency, and introduce new models of care, which will further improve the services our NHS delivers.

"This is thanks to the ongoing hard work and dedication of our NHS staff."