An increasingly warped sense of humour could be an early warning sign of impending dementia, say UK experts.
The University College London study involved patients with frontotemporal dementia, with the results appearing in the Journal of Alzheimer's Disease.
Questionnaires from the friends and family of the 48 patients revealed many had noticed a change in humour years before the dementia had been diagnosed.
This included laughing inappropriately at tragic events.
Experts say more studies are now needed to understand how and when changes in humour could act as a red flag for dementia.
There are many different types of dementia and frontotemporal dementia is one of the rarer ones.
The area of the brain it affects is involved with personality and behaviour, and people who develop this form of dementia can lose their inhibition, become more impulsive and struggle with social situations.
Dr Camilla Clark and colleagues recruited 48 patients from their dementia clinic at University College London.
And they asked the friends or relatives of the patients to rate their loved one's liking for different kinds of comedy - slapstick comedy such as Mr Bean, satirical comedy such as Yes, Minister or absurdist comedy such as Monty Python - as well as any examples of inappropriate humour.
Nearly all of the respondents said, with hindsight, that they had noticed a shift in the nine years before the dementia had been diagnosed.
Many of the patients had developed a dark sense of humour - for example, laughing at tragic events in the news or in their personal lives. The dementia patients also tended to prefer slapstick to satirical humour, when compared with 21 healthy people of a similar age.
Dr Clark said: "These were marked changes - completely inappropriate humour well beyond the realms of even distasteful humour. For example, one man laughed when his wife badly scalded herself."
'More and more erratic'
Lee Pearce, from Sheffield, was not involved in the study, but he can relate to the findings.
He first noticed a change in his mum's behaviour when she was 55, but it took four years before she received the correct diagnosis of frontotemporal dementia.
"She'd always been very loving and family-focused but became increasingly uninvolved and emotionless," he says.
"As she had a history of depression, we put it down to that, and her doctor agreed.
"Mum's behaviour became more and more erratic, and we began to question the diagnosis.
"She'd forget family birthdays, laugh if someone had an accident or she heard someone was unwell and was even sacked from her job - all completely out of character."
Dr Simon Ridley, of Alzheimer's Research UK, said anyone concerned about changes in their behaviour should speak to their GP.
"While memory loss is often the first thing that springs to mind when we hear the word dementia, this study highlights the importance of looking at the myriad different symptoms that impact on daily life and relationships," he said.
"A deeper understanding of the full range of dementia symptoms will increase our ability to make a timely and accurate diagnosis."