Police Scotland state a ‘significant’ leak was reported around one mile north of Kirkconnel — close to Rigg House — at about 4pm.
A spokesman warned the route could be closed for a number of hours while engineers isolated and dealt with the leak.
Diversions were put in place for through traffic.
Gas network managers SGN stated on Tuesday evening: “To ensure he safety of everyone we need to temporarily close the A76 in both directions between New Cumnock and Kelloholm.
“Significant northbound and southbound diversions will be in place for motorists so please leave extra time for your journey.
“It is too early to say how long our repairs will take to complete. However, we appreciate this is a particularly traffic sensitive location and are working extended hours in order to complete our repairs as soon as possible.”