A nurse caught driving without insurance got behind the wheel out of a "sense of loyalty" to go and help a friend who was in distress after a violent row.
Snezana Kanuric (37), a learner driver at the time, said she was trying to protect her friend when gardaí stopped her.
Judge John Hughes fined her €300, but spared her a driving ban after deciding there was a "special reason" not to take away her licence.
Kanuric, of The Hermitage, Balgriffin, pleaded guilty to driving without insurance and as an unaccompanied learner.
Dublin District Court heard that a garda on duty at Fairview Strand on the afternoon of August 30 last year stopped the accused when he saw her driving while using her phone.
She had a provisional licence and no valid insurance, the garda said. She had no previous convictions.
Kanuric had received a call from a friend who was in a "violent dispute with her partner" and "out of a sense of charity and loyalty" she drove to her aid.
She had been on the phone to the friend while driving, her lawyer said.
"She shouldn't have done it, but in the agony of the moment she tried to do what was right in her mind," he said.
The lawyer said that if banned, the adverse consequences for Kanuric would be severe, and in all likelihood she would lose her job.
Kanuric now had a full licence and was fully-insured.
Her lawyer said the reason she was driving and the potential loss of her livelihood amounted to a "special reason" not to disqualify her.
In evidence, Kanuric said that when she got the call on the day, her friend was "very distressed" after an argument and afraid her boyfriend would come back.
"I was trying to protect my friend," the accused told the judge.
Judge Hughes said Kanuric was a "credible individual".
While she was "objectively wrong" and he did not in any way condone her actions, he accepted that she appeared to believe there was an immediate threat and her presence was required.