Health boards are to be given an extra £50 million to help cut NHS waiting times after new figures showed more patients are having to wait longer for both treatment and tests.

The Scottish Government announced the new funding after official figures showed a flagship target is not being met for one in six patients.

The latest NHS data showed that in March 2017 the 18-week referral to treatment target was achieved for 83.2% - with only four out of 15 health boards achieving the 90% standard.

The figure represents a fall over the last year - the NHS met the 18-week target in 86.6% of cases in March 2016 - with the Liberal Democrats stating performance on this was now at an "all-time low".

Other figures showed an increase in people waiting for key diagnostic tests and more people having to wait longer than 12 weeks for either inpatient or day-case treatment in Scotland's hospitals.

A report revealed there had been "a sustained increase in patients waiting over 12 weeks during 2015 followed by a sharper rise over the last year".

On March 31 this year, 59,029 people had been waiting over 12 weeks for a new outpatient appointment, compared to 29,609 in March the previous year.

There were 11,168 people who had been waiting more than 12 weeks for either inpatient or day treatment in hospital - up from 2,977 at the end of March 2016.

In NHS Forth Valley, the 12-week treatment time guarantee (TTG) was achieved for less than two-thirds (63.5%) of patients while across Scotland just over four-fifths (82.1%) received their treatment within this time.

Opposition MSPs criticised the SNP administration, with Labour's Anas Sarwar saying: "Scotland's NHS is paying the price of the SNP's separation obsession."

Health Secretary Shona Robison said the additional £50 million "will help us reduce waiting times at all stages of a patient's journey through the NHS".

She added: "I absolutely recognise the need to do more to reduce waiting times - particularly when it comes to the 12-week TTG for inpatient and day cases.

"Our ambitions for the NHS are founded on the twin approach of investment and reform.

"This additional investment I am announcing today will help improve performance and reduce waits."

In NHS Ayrshire and Arran, the 18-week referral to treatment standard was met for less than three quarters (73.6%) of patients, according to the latest data.

Across Scotland, 19,448 "patient journeys" took longer than 18 weeks, compared to a total of 14,469 in March 2016.

The six-week waiting-time target for eight key diagnostic tests - including CT scans and MRI scans - was met for 86.7% of patients in March 2017, down from 94.6% from the same month in 2016.

Gregor McNie, Cancer Research UK's senior public affairs manager for Scotland, said: "These statistics are a clear indication that the NHS in Scotland is not coping with increased demand for diagnostic tests and action is needed in health board areas that are struggling with lengthy waits.

"It's very worrying that people in Scotland are still waiting too long for tests.

"Quick access to tests is a vital part of diagnosing cancer early and some of these people might have a symptom that could be cancer."

Mr Sarwar, Labour's health spokesman at Holyrood, said: "The SNP's drive for an unwanted second independence referendum is not just holding our health service back - it is causing standards to fall.

"The SNP is breaking its own laws for thousands of patients every month because Nicola Sturgeon and Health Secretary Shona Robison only care about independence, not patients and our hard-working NHS staff."

Liberal Democrat health spokesman Alex Cole-Hamilton said: "These statistics debunk the SNP's claim that the NHS is their priority. The fact is that for the SNP independence will always come first.

"On the day that Nicola Sturgeon launches the SNP manifesto, she should be personally apologising to the tens of thousands of patients who have waited longer than promised because of her government's obsession with independence."

Tory health spokesman Donald Cameron was also critical of the Government, saying there were tens of thousands of patients "waiting too long for treatment".

He said: "These figures reveal that the SNP are continuing to let down patients whilst showing a complete lack of urgency when it comes to sorting out the blatantly obvious problems which beset the NHS in Scotland.

"People are growing ever-more frustrated that, instead of doing everything in their power to address these abysmal figures, the SNP has constantly brushed statistics aside and opted to push for an unwanted independence referendum instead.

"The SNP must confront these failings at once and get back to the day job."