The A70 Edinburgh to Lanark road was closed for several hours near Harperrig Reservoir after the accident at 5.35pm yesterday.
A Honda Civic travelling west was involved in a head-on collision with a Skoda Fabia heading in the opposite direction, police said.
The four occupants of the vehicles were taken to the Royal Infirmary of Edinburgh with various injuries.
Sergeant Roger Park, of the national trunk road patrol group, said: "I wish to thank those motorists and members of the public who stopped at the scene to assist the persons involved and who provided information to police at the time.
"I would now appeal to anyone else who thinks they may have witnessed the incident or who perhaps think they have information relevant to our enquiries to contact police immediately."
Anyone with information can contact Police Scotland on 101.