A would-be novelist fighting over money with her estranged husband had an "intense psychological need" to live in her £2.2 million, seven-bedroom home, a High Court judge has said.
Mr Justice Mostyn said the woman - a 48-year-old former lawyer who would like to be a fiction writer - and her husband had moved into the north London house in the month they separated.
The judge said she had lived in the property for less than two years - but had a desire to stay "almost amounting to desperation".
And he said a lawyer representing the woman had told him how she had suffered from "low mood and depression for many years" and that her attachment to her home was "extremely powerful".
Mr Justice Mostyn ruled that the woman could have the house - and said her estranged husband should pay a lump sum of £120,000 and monthly payments of more than £10,000 for the next five years.
Detail has emerged in a written ruling by the judge after the couple argued over who should get what at a hearing in the Family Division of the High Court in London.
The judge said the woman had been married to her husband, a lawyer earning £600,000 a year, for 18 years. They had four children and assets of nearly £4 million.
"In 2010 the parties ... purchased a property in North London," said Mr Justice Mostyn.
"That property needed much building work and they did not move in until April 2012; it was in the same month that they separated.
"Although the wife has only been living in the property for 22 months she says that she has an intense psychological need, almost amounting to desperation, to continue living there notwithstanding that it is a large property with seven bedrooms which on any view would be too big for her once all the children had left the nest."
And the judge said a lawyer representing the woman had told him: "(She) has suffered from low mood and depression for many years. Her attachment to her home ... is extremely powerful and she wishes to retain it."
Mr Justice Mostyn said the man had put "considerable emphasis" on a pre-marital agreement. The woman how told him that she had "paid no attention to the agreement" and dismissed it as "being like something out of Dallas or Dynasty".
But the judge said he had "had little doubt" that the woman "knew exactly what she was signing up to". He said the couple had "plainly intended" the agreement to apply.