Children's author Helen Bailey joked with her brother that a cesspit at her home was a "good place to hide a body" - nearly three years before being found dead there.
The body of the 51-year-old writer was discovered swamped in human excrement alongside her beloved dachshund Boris underneath her lavish property in Royston, Hertfordshire, in July 2016.
Her fiance, Ian Stewart, 56, of Baldock Road, Royston, is accused of drugging and killing her, before dumping her body in a septic tank at the home they shared.
Ms Bailey’s brother, John Bailey, told Stewart's trial at St Albans Crown Court that the quip had been made in full earshot of the defendant, during a visit to the home in August 2013.
After going into the garage - the location of the septic tank - he was told by the couple that it was based in a well, but joked it was not a wishing well.
"Then there was some banter, almost certainly instigated by Helen, that it was a good place to hide a body," he said.
Stuart Trimmer QC, prosecuting, asked if both the defendant and Ms Bailey were present at the time.
"Yes, they were," he told the court.
The defendant denies charges of murder, preventing a lawful burial, fraud and three counts of perverting the cause of justice.
The victim’s brother told the court they had gone into the garage because the previous owner had left his car there and was coming to collect it.
Then they struck up a conversation about the well.
He said: “I asked had they looked in it and I was told no, it was not that kind of a well, by which I mean the wishing well kind of a well."
He told jurors he did not remember the exchange until a police officer told him his sister's body had been discovered in it years later.
Asked about his sister, he said she was a "highly intelligent" and "strong-willed" woman, who was "extremely funny".
He added: "She was very much somebody who would come to someone's aid as a friend, she would always put herself out there."
Ms Bailey would also worry "incessantly", he told the court, about her family and her fiance Ian’s health, and had turned to writing again to cope with the grief of the death of her husband, John Sinfield, in 2011.
She had then met Stewart on a dating website for people who had been widowed and, when the pair were engaged, she told her brother to keep it secret.
Their wedding plans were continually pushed back by Stewart’s battle with cancer, he told the court.
On April 13 2016, Mr Bailey first heard that his sister had vanished, after the alarm was raised by her close friend, Tracey Stratton, who could not get hold of her, he said.
After also failing to get hold of her, he rang Stewart, who allegedly told him he had received a note saying she had gone to her home in Broadstairs, Kent, and asked not to be contacted.
He said: "When I told him I didn't know (where she was), he said 'Oh, now you have got me worried'.
"He had a slight tone of concern, slightly mild panic."
Pressed on the exact details of what had happened on the day she was last seen, the defendant was said to have told Mr Bailey she had had an incident on the road and claimed she did not want to drive again.
He also allegedly said he had been given papers to take to the solicitors on the way to a doctor's appointment, concerning the sale of her flat in Gateshead, Tyne and Wear.
The next day, Mr Bailey ventured to the address in Broadstairs himself.
He found no sign of life at the house and said he would have expected barking because Ms Bailey would have been with her dog Boris - on whom she "doted".
He then posted a note through the letterbox.
"I think the note said please could she get in contact with me without fail, there is nothing to worry about, but I did need to talk to her as soon as possible," he said.
Ms Bailey had been missing for three months when police officers opened the hatch to the cesspit beneath her garage and saw an arm protruding from the waste.
It is alleged that the killing had "money as its driving motive", with Stewart in line to be a "substantial" benefactor of the author's £4 million fortune in the event of her death.
He is also accused of acting out a "charade" in the three months following her disappearance, helping with the search effort and sending her bogus text messages to mask his involvement.
Ms Bailey was known by younger readers for her characters Electra Brown and Daisy Davenport, but found a new audience with her blog, Planet Grief, about becoming a widow.