Lawyers for the Health Service Executive have told the High Court that Pieta House will take over the functions of the suicide bereavement charity Console.
Senior Counsel Rossa Fanning said the transition would be "all but seamless" as an agreement was finalised this afternoon.
Details of the agreement should be kept confidential because of their commercial sensitivity, the court was told.
Mr Fanning said each service user would be contacted and advised of the changes, and they would be given the option of continuity of service or to opt out.
He said there would be a hiatus of just one hour when the 24-hour helpline would be closed.
Judge Paul Gilligan said it appeared the best possible alternative arrangements had been put in place.
This follows the appointment by the court of a provisional liquidator to Console, three weeks after an RTÉ Investigations Unit programme exposed serious financial irregularities at the charity.
The judge made the order after hearing Console was "hopelessly insolvent" with debts totalling €294,000 and would be unable to meet its obligations.
In a sworn statement by interim CEO David Hall, the court was told the charity had been loss making for several years, despite its accounts showing otherwise.
He said it would require €105,000 a month to continue. It currently receives €53,000 a month from the HSE.
Due to the recent scandal it was expected that grants and donations would "reduce to a trickle". As a result, the charity cannot meet its current contractual obligations and its services cannot continue, the court was told.
The court heard the charity will not be in a position to pay its wages at the end of July and has arrears of wages of €77,500. Revenue is owed €74,000 and €90,000 is owed to suppliers.
He said as matters stand, the HSE is not willing to support Console with €105,000 per month and it is clear the company is hopelessly insolvent.
However he said it was important that service users were not left unattended and therefore a provisional liquidator should be appointed to allow a level of service to be provided and to allow an alternative service provider access to data.
The court was told if the services provided by Console were not continued in some way it would lead to people taking their own lives.
Mr Justice Gilligan appointed a provisional liquidator but had said it was subject to the HSE coming to court to outline what alternative service will be provided.
The judge noted that the charity assists around 6,000 people a year and 314 are currently receiving one-to-one counselling.
He also noted there are 29 calls a day to the helpline and Console has 12 full-time employees and 60 contracted counsellors.
The judge said he would require a sworn statement from the HSE outlining what alternative arrangements were to be put in place.
Senior Counsel Fanning said the HSE had been endeavouring to put in place a transition to protect the continuity of the services provided by Console.
Lawyers for the Office of the Director of Corporate Enforcement also told the court they would be looking for access to Console's records for a criminal investigation.
Console clients urged to continue access to services
Minister for Health Simon Harris said it has been an extraordinarily difficult number of weeks for service users and for staff who had not been paid.
Speaking on RTÉ's Six One News, the minister said he was hopeful "that they will be looked after as quickly as they possibly can".
Harris says the services of Console transferred to Pieta House at about 5pm this eveninghttps://t.co/D3bZFUNOyF— RTÉ News (@rtenews) July 14, 2016
He commended the RTÉ Investigations Unit for its work, but said the HSE's internal audit - its own structures – had identified the problems at the charity.
Action is now needed, he said, to ensure that people who potentially engaged in fraud and who certainly engaged in deception answer very serious questions.
In a joint statement with Mr Harris this evening, Minister of State for Mental Health and Older People Helen McEntee that today is tinged with some sadness.
“Suicide has touched so many people and families in this country and people put their heart and soul into volunteering and fundraising for Console.
“We are a very generous people and we must remember at this time that the vast majority of people and charitable organisations do incredibly important work and they need our continued support."
Pieta House Chief Executive Brian Higgins has urged clients of Console to continue to access services, which are now being provided by his charity.
Mr Higgins said that a 24/7 helpline was now up and running and being delivered by Pieta House.
He said the charity would also soon be in a position to provide bereavement counselling and liaison services to former Console clients.
It was critical, he said, that these services be maintained. He also said that he would hope, where possible, Console counsellors would be given contracts with his charity.
He said that he hoped to be in a position to rent the premises formerly occupied by Console.
Meanwhile, the HSE's National Director of Mental Health said that Pieta House will meet with former Console staff in the coming days to discuss their positions.
Anne O'Connor said it would be in the interests of clients that their relationships with their counsellors would be maintained, but that this was a matter for Pieta House.
She said the costs associated with the transfer of services from Console to Pieta House was still to be discussed.