The longest waits in ambulances have been found to be in Wales, new figures show.
The data for NHS hospitals in England, Scotland and Wales, obtained by the BBC under the Freedom of Information Act, suggest Wales had the longest waits.
In the response it was revealed one ambulance was left queuing for six hours 22 minutes.
The Welsh government said the figures were unacceptable but that most people were waiting less than half an hour.
Paramedics can only hand patients over to hospitals when staff there are ready to take charge of them.
This process is supposed to take no longer than 15 minutes and delays of more than 30 minutes can lead to fines for hospitals in England.
The BBC asked all UK ambulance services for their longest waits for each of the 12 weeks from early August to the end of October.
Each weekly maximum wait in Wales for the period was above three hours.
Scotland had the best record in the UK with none of the weekly maximums exceeding two hours.
Dr Clifford Mann, president of the College of Emergency Medicine, said: "There's always going to be a small number of patients whose transfer is delayed, but not to the extent of these figures - which are approaching three, four - sometimes six hours.
"And remember, these figures relate to the three months up till October. They don't include the really pressured time of the winter and so it's unlikely these figures are going to improve - and that must be a cause for concern."
A Welsh government spokesman said: "Lengthy patient handover delays are clearly unacceptable."
But he added the long delays were the "exception to the rule" as the average waiting times were around the 20-minute mark.