Emergency services responded at 4.20 pm to reports of a two-vehicle collision.
A Renault Clio and a Renault Scenic were involved and four people were taken by ambulance to the Dumfries and Galloway Royal Infirmary where it was established there were no life-threatening injuries.
The road was reopened at around 8pm.
A Police Scotland spokesman said: “Enquiries are ongoing to determine the circumstances surrounding the collision.
“Anyone who witnessed the incident is asked to contact the Lockerbie Trunk Roads Policing Group via the 101 number.”
NEWSDESK: 01461-202417