An energy supply company with almost 300,000 customers has ceased trading.
Spark Energy Supply is part of a gas and electricity firm which employs more than 300 staff at its Selkirk headquarters.
The move comes after the company was given a £14m bill by the energy regulator Ofgem for non-payment of its renewable power obligation.
Ovo Energy has confirmed it has entered into a conditional agreement to buy the company and take on its customers.
Ofgem said the energy supply for Spark's 290,000 customers would continue as normal.
It advised customers to take meter readings, and said outstanding credit balances would be protected.
Ofgem said it would soon transfer customers to another supplier at competitive rates.
On its website, Spark Energy said it employs more than 300 staff in the Borders town.
A Spark spokesperson said the company which had ceased trading was the part of the group which holds its energy supplier licence.
The company said: "Meanwhile Spark Energy Ltd, the group's parent company, has been working on creating an opportunity for our workforce which could see us becoming a part of one of the UK's largest independent energy suppliers.
"KPMG has been assisting us in this process.
"If successful it would mean Spark becomes a standalone part of this large independent supplier - operating from our offices in Selkirk, Edinburgh and Horsham, supplying our customers under the new parent company's licence."
Mary Starks, Ofgem's executive director for consumers and markets, said: "Our message to energy customers with Spark is there is no need to worry, as under our safety net we will make sure your energy supplies are secure and your credit balance is protected.
"Ofgem will now choose a new supplier and ensure you get the best deal possible. Whilst we're doing this our advice is to 'sit tight' and don't switch.
"You can rely on your energy supply as normal. We will update you when we have chosen a new supplier, who will then get in touch about your new tariff."
She added: "Although we have seen a number of supplier failures this year, our safety net procedures are working as they should to protect customers."
An Ovo Energy spokeswoman said: "Ovo Energy can confirm we have entered into a conditional agreement to buy the operating company of Spark Energy, and we also intend to submit a proposal to Ofgem to take over their customers.
"We have been working with the management team in Selkirk to ensure Spark Energy jobs will be protected and customers' services will not be disrupted."
Rival firms Extra Energy, Future Energy, National Gas and Power, Iresa Energy, Gen4U and Usio Energy have all gone bust in 2018.
MP John Lamont said: "This is clearly a very worrying time for staff and their families at what is one of the largest employers of high-quality jobs in the Borders.
"This news affects the supply arm of the business.
"I've spoken to senior management at Spark Energy, the parent company and I remain hopeful that a solution can be found which protects jobs in Selkirk."