The Edinburgh-Carlisle road will be shut at its junction with the A699 Selkirk-St Boswells route north of Hartwoodburn Farm between 8pm and 6am from next Monday, August 21, until the morning of Friday, August 25.
That series of overnight closures is to allow a £280,000 resurfacing scheme to be carried out.
A spokesman for Amey, the company carrying out the work, said: “This programme will benefit around 6,000 vehicles which use this junction each day by improving the condition of the carriageway and associated verges and reducing the need for future, more extensive maintenance.
“To allow this work to take place, there will be a full road closure at this location with a signed diversion route in operation.
“The X95 Borders Buses service will also be affected by the closure.”
While the road is shut, traffic travelling northbound will be diverted to exit the A7 at the North Bridge roundabout in Hawick and head south into Mart Streettaking the second exit onto the eastbound A698 at the roundabout next to the town’s Morrisons store.
From there, traffic will join the A68 at Bonjedward, then continue in a north-westerly direction onto the A699 at St Boswells, rejoining the A7 south of Selkirk.
Southbound traffic will follow the same diversion but in the opposite direction.
For further details, go to www.trafficscotland.org