The route between Edinburgh and Tweedbank had been hit by delays and cancellations.
ScotRail apologised for the problems and said buses had been organised to supplement the trains that could run.
More minor disruption on the route between the Borders and Edinburgh was cleared by about 16:00.

A review of homes in Wales said they were seen as places of "irreversible decline" where residents were unable to do things that matter to them.
The report was published by the Older People's Commissioner for Wales.
The Welsh government said it was already taking action on issues raised in the report, A Place to Call Home?
Care Forum Wales, which represents 500 care providers, said the findings support what it has long been saying.
Experts in health and social care undertook unannounced visits to 100 care homes across Wales.
And more than 2,000 questionnaires were completed by care home residents and their families.
The report's key conclusion was: "Too many older people living in care homes quickly become institutionalised. Their personal identity and individuality rapidly diminishes and they have a lack of choice and control over their lives."
It looked at residents' social participation, their home environment, diet, staffing and training as well as commissioning, regulation and inspection of services.
Commissioner Sarah Rochira called "for action to deliver the change required within our care homes and ensure that quality of life sits at the heart of the delivery of residential and nursing care across Wales".
She said: "While my review found excellent examples of truly person-centred care, enabling and empowering care that delivers the very best outcomes for older people, there are significant variations across Wales that result in too many older people living in care homes having an unacceptable quality of life."
The review was undertaken using the commissioner's statutory powers which means care providers and public bodies have to act on the findings.
Care and Social Services Inspectorate Wales (CSSIW) chief inspector Imelda Richardson said it had moved away from a tick box culture to focusing on quality of life of people during its inspections of older people's care homes in Wales.
She said while the majority of care homes provide good or excellent care, there is "still an unacceptable level of care in some homes".
Care Forum Wales chair Mario Kreft said the report did not "fully recognise what is being achieved despite the system".
He supported a call for services being commissioned for quality rather than reinforcing a "culture of compliance to the bare minimum".
He added: "The commissioning process should be about quality and securing value for money and not about paying the lowest possible price."
A Welsh government spokesperson said: "The Welsh government, for its part, is already taking action on many of the areas highlighted in this report through a draft Bill to strengthen the regulation and inspection of social services.
"We expect the care sector to consider this report carefully - as the Welsh government will - and reply to the Older People's Commissioner's specific points."

The 1962 document is said to be one of the most important contracts in popular music, marking the beginning of the band's journey to international fame.
The contract had been expected to fetch up to £500,000 in a sale of other rock memorabilia.
It last went under the hammer in 2008 at an auction in London when it went for £240,000.
It is the only managerial contract signed by both the final line-up of the Beatles - John Lennon, Paul McCartney, George Harrison and Ringo Starr - and their manager.
The contract was signed on 1 October 1962 at Epstein's office in Whitechapel, days before they released their first single, Love Me Do. It was witnessed by Epstein's secretary, Beryl Adams.
A single page from John Lennon's high school's detention book was also sold for £2,500, recording 29 occasions when he received detention at Quarry Bank High School in Allerton, Liverpool.
£1.75m Rolls Royce Phantom V belonging to John Lennon
£1.45m The piano on which John Lennon wrote Imagine
£800k Handwritten lyrics for A Day in the Life
£500k Drumskin on Sgt. Pepper album cover
The lots were part of Sotheby's sale also featuring a grand piano used in almost all of Abba's studio recordings between 1973 and 1977, which did not sell.
Instruments, clothing and manuscripts from the collection of Cream bassist Jack Bruce sold for between £688 for a manuscript book to £9,750 for a Warwick Fretless Thumb Bass.
A powder blue Fender Stratocaster played by Eric Clapton sold for £45,000.
Services on the Borders Railway are "running as normal" after severe disruption due to signalling problems.
[NEXT_CONCEPT]
Many older people living in care homes have an "unacceptable quality of life" and quickly become institutionalised, says a watchdog.
[NEXT_CONCEPT]
The original contract signed by The Beatles and manager Brian Epstein has sold at Sotheby's for £365,000.