The percentage of hospital inpatients waiting longer than 12 weeks for treatment has gone up over the past year.
Official figures show 28.1% were not treated within the guaranteed waiting time set by the Scottish government in the quarter ending 31 December 2019.
That compared to 27.0% during the same period in 2018.
The 12-week target for outpatients improved but was still below the government's commitment.
Health secretary Jeane Freeman said the statistics showed "improvements in performance in a number of key elective waiting times areas".
In total, the 12-week guarantee for inpatients and day cases was broken on almost 83,000 occasions last year.
That was despite the government spending more than £100m during that time to target the problem.
Ministers introduced legislation in 2012 stating that patients waiting for hospital treatment - either as as an inpatient or as a day case - should not have to wait longer than 84 days.
But NHS figures reveal in the last three months of 2019 this treatment time guarantee (TTG) was breached for 19,638 patients - taking the total for the year to 82,617.
In the final quarter of 2019, 71.9% of patients were admitted to hospital within 12 weeks - a slight increase from the 71.3% recorded in the period from July to September.
But two health boards breached the TTG for more than two-fifths of those waiting for hospital treatment - with NHS Tayside and NHS Highland achieving the 12-week target for 58.2% and 59.3% of cases - while in NHS Grampian it was met for 61.1% of patients.
In October 2018, the Scottish government announced an action plan to reduce NHS waiting times.
But the Conservatives claimed the SNP was "utterly incapable" of improving performance in this key area.
The party's health spokesman Miles Briggs said the most recent figures were a "damning indictment" of health secretary Jeane Freeman and "the SNP's mismanagement of our health service".
"Not only has the cabinet secretary presided over a significant fall in waiting times but she has wasted £150m at the same time," he said.
"It is the SNP's policies of cutting capacity within the health service that is causing these dreadful waiting times - forcing thousands of patients to wait far longer than necessary.
"Despite all that cash, the SNP is clearly utterly incapable of improving waiting times."
Jeane Freeman said: "We have seen a 17% improvement in numbers waiting over 12 weeks for a new outpatient appointment in the last two years and a 40% improvement in numbers waiting over six weeks for one of the four scope tests in the last year.
"These statistics also show, for the first time, a breakdown to speciality level. Across speciality areas, since March 2019 there was a 22% reduction in patients waiting over 12 weeks for ophthalmology procedures, as well as a 15% reduction for trauma and orthopaedic surgery and a 21% reduction in urology treatment."
The health secretary added: "These improvements are testament to the hard work and dedication of all NHS staff.
Separate figures show a small improvement in the number of patients who went from first referral to treatment (RTT) within 18 weeks - although performance was still well below the 90% target set by the Scottish government.
In December 2019, 78.9% of patients across Scotland were reported as having been treated within 18 weeks of referral, up from 77.2% the previous month.
But the report noted: "Since the introduction of the 90% RTT standard, NHS Scotland performance has decreased from 92.4% in June 2012 to 78.9% in December 2019."
Meanwhile, more than a fifth (20.5%) of those waiting for diagnostic tests had been waiting for more than the target six weeks, according to the latest data.
As of 31 December 2019, 87,543 patients were waiting for one of eight key tests, with 17,906 having been waiting for six weeks or more.
Cancer Research UK in Scotland said NHS staff shortages were contributing to the delays.
Spokeswoman Marion O'Neill said: "It's concerning that such a large number of people, including those with suspected cancer, are waiting longer than the target time for tests."