A 65-year-old man and a 35-year-old man both died following the collision on the A713, near Patna at about 4.40pm on Thursday.
Emergency services attended, but the two men, who were in a Volkswagen Sirocco, were pronounced dead at the scene.
A 62-year-old woman, who was a passenger in a BMW 4 Series involved in the crash was taken to the Queen Elizabeth University Hospital in Glasgow where hospital staff have described her condition as critical.
The 35-year-old driver of the BMW was taken to Crosshouse Hospital where she remains in a stable condition.
Two other people in a Vauxhall Mokka involved in the collision were taken to Ayr Hospital to be treated for injuries following the fatal crash.
The 48-year-old driver of the Vauxhall is in a stable condition in hospital and her 22-year-old male passenger was released after treatment.
Police are appealing for information that could help assist them in their investigation into the circumstances surrounding the crash.
Sergeant Kevin Blackley of the Road Policing Unit in Ayrshire said: “Our enquiries are continuing to establish the full circumstances surrounding this collision and our thoughts and condolences are with the family and friends of the men who died.
“I would urge anyone who may have witnessed the crash, or observed the vehicles beforehand to please contact us as soon as possible. Likewise, any motorists with dash-cams who were travelling on the A713 on Thursday afternoon, please check your footage in case you have captured anything which could be of significance to our investigation.
“The road was closed for around eight hours with diversions in place, and I would like to thank the public for their patience while emergency services attended.
“Anyone with information should call Police Scotland on 101, quoting reference number 2664 of 22 July.”