More A&E patients in England are being seen quickly but there is still room for improvement, a report has said.
The government wants waits cut to less than four hours
The National Audit Office predicts many hospitals will hit government waiting time targets thanks to reorganisations.
But staff and bed shortages mean some hospitals have not shifted bottlenecks, the public spending watchdog said.
The government has said A&E patients should be seen within four hours by the end of the year - 23% had to wait longer than four hours in 2002.
In the three months from April to June this year, 5.3% of patients waited over four hours in A&E services.
Scotland does not have a similar target but measures the time it takes 90% of A&E patients to be seen.
Wales has a target of 95% to be seen within four hours, while Northern Ireland aims to reduce waits of more than two hours for patients requiring admission by a third by March next year.
While few children or people with minor injuries are kept waiting, some patient groups still face waits longer than the target four hours, the NAO found.
People who needed to be admitted to hospital, such as the elderly with complex medical conditions and people with mental health problems, were more likely to have to wait.
One reason for this was lack of access to diagnostic tests.
Other patients were stuck waiting for a bed when one could have been made available through better planning of admissions and discharges, according to the report.
A major barrier was a lack of specialists to admit patients, according to the report.
More than half of the trusts surveyed reported shortfalls in consultant numbers or other emergency medical staff to provide around the clock services.
And about a quarter were concerned about recruiting and retaining the right mix of experienced nurses who can keep waits down by treating and discharge patients without the need for supervision.
There were fears that changes to doctors' working hours under the European Working Time Directive would compound the problem, the report said.
It said emergency departments were coping well overall against a background of continuing high levels of demand.
But it pointed out that the full impact of changes to NHS working, such as GPs no longer having to provide emergency cover for their patients, had yet to be felt.
NAO IDENTIFIED BOTTLENECKS
Shortage of available beds
Delays in accessing specialist opinion
Shortages of specialist staff
Many patients were using A&E departments to access emergency care because they knew they would be seen quickly, said a spokeswoman.
A&E departments are being encouraged to work with other providers of emergency services, such as ambulance trusts, minor injury services and NHS Direct, to provide emergency care.
England's 81 walk-in centres have proved popular with patients, with 1.6 million visits in 2003-04.
But the NAO said these were mainly "addressing previously un-met demand rather than taking pressure off existing services".
Sir John Bourn, head of the NAO, said: "The Department of Health should continue to pursue more effective joint working."
But Edward Leigh, chairman of the House of Commons committee of public accounts, said the long waits were unacceptable and truly integrated working was proving hard to achieve.
"The Department's promise in 2001 that it would link all these services through a single point, NHS Direct, is starting to look a little empty, given that we are now being told it will not happen until December 2006," he said.
The Royal College of Nursing said A&E departments were becoming a victim of their own success by treating patients quickly because more would use this route rather than other emergency services, such as GP out-of-hours care.
NHS chief executive Sir Nigel Crisp said: "Thanks to extra investment, the number of doctors and nurses is increasing as more of them are relishing the opportunity to have more specialised roles in A&E."
Paul Burstow, Liberal Democrat Shadow Health Secretary, said: "Ministers have been found guilty of exaggerating when it comes to tackling the staff shortages.
"This report should remind them that this is still a pressing issue for A&E departments across the country."
Conservative Shadow Health Secretary Andrew Lansley said the four-hour wait target failed to reflect the relative priority of individual patients and was no longer needed.
But Mr Don MacKechnie, chairman of the British Medical Association's A&E Committee said: "The four-hour standard is here to stay and we will need sustained resources to ensure it is met by A&E departments across the country."
The Royal College of GPs and Sir George Alberti, national clinical director for emergency care, said there was no evidence to suggest that a rise in A&E attendance was linked to the handover of responsibility for evening and weekend medical cover from GP practices to primary care trusts.
Sir George added: "We are monitoring this situation closely."