Former Chelsea doctor Eva Carneiro settled her case against the club and their ex-manager Jose Mourinho for an undisclosed sum on Tuesday just as she seemed set to testify against them.
After negotiations that saw lawyers scuttling back and forth between two rooms at the London South Employment Tribunal in suburban Croydon, both sides reached a private agreement.
"The parties agreed to the settlement of this dispute on confidential terms," lawyer Daniel Stilitz, representing Chelsea and Mourinho, told the tribunal at a delayed hearing that eventually lasted no more than two minutes.
Carneiro, whom Chelsea said had rejected an offer of £1.2 million ($1.75 million, 1.54 million euros) to settle her claims, had been due to start giving evidence Tuesday in her case against the London club and Mourinho, who was appointed Manchester United's new manager last month.
She was pursuing a constructive dismissal case against Chelsea and a connected, personal legal action against Mourinho -- who left the Blues in December -- for alleged victimisation and sexual discrimination.
But when Mourinho and Chelsea's top executives unexpectedly arrived at the tribunal before Carneiro was due to start giving evidence, it seemed a deal to avert an eight-day public slanging match was in the offing.
Two dozen reporters shut inside a waiting room could only watch through a small window as representatives from both sides moved along the corridor, as lightning flashed and thunder shook the building in a torrential rainstorm.
Carneiro, 42, said she was "relieved" to have concluded the case, calling it an "extremely difficult and distressing time for me and my family", in a statement after the brief hearing.
Chelsea said it was "pleased" that an agreement had been reached.
"The club regrets the circumstances which led to Dr Carneiro leaving the club and apologises unreservedly to her and her family for the distress caused," said a statement on behalf of the club and Mourinho.
But there was no apology from the Portuguese manager in either the statement, or before a heaving scrum of reporters, photographers and cameramen which surrounded him as he left the tribunal.
Carneiro alleges Mourinho shouted "filha da puta" at her -- Portuguese for daughter of a whore -- after she ran on the pitch during a match.
In an extract from a statement by Mourinho read out before the tribunal on Monday, he claimed he was known for regularly using the term "filho da puta", meaning son of a whore, in the heat of a match and had done so throughout the game in question.
Mourinho dropped Carneiro as Chelsea's first team doctor after the Blues' opening match of last season in the English Premier League, a 2-2 draw at home to Swansea on August 8.
Mourinho angrily berated her after she and physio Jon Fearn ran on the pitch to treat midfielder Eden Hazard, obliging him to leave the field of play before being readmitted.
That meant the Blues were temporarily down to nine players -- goalkeeper Thibaut Courtois having already been sent off -- at a critical late stage of the game.
Mourinho had branded Carneiro and Fearn "impulsive and naive" afterwards, saying they failed to understand the match situation.
She did not appear on the bench again for first-team duties and later parted company with Chelsea.
Carneiro defended her actions in her statement, saying: "My priority has always been the health and safety of the players and fulfilling my duty of care as a doctor.
"In running onto the pitch to treat a player, who requested medical attention, I was following the rules of the game and fulfilling my medical responsibilities."
Chelsea accepted that the doctor had "always put the interests of the club's players first", calling her a "highly competent and professional sports doctor."
The agreement also means Mourinho avoids a day of questioning before the tribunal.
"Jose Mourinho also thanks Dr Carneiro for the excellent and dedicated support she provided as first team doctor and he wishes her a successful career," the statement said at the end.