Dr. Oliver Sacks, the neurologist who studied the intricacies of the brain and wrote eloquently about them in books such as Awakenings and The Man Who Mistook His Wife for a Hat, died on Sunday at the age of 82, the New York Times reported.

The British-born Sacks, who announced in February 2015 that he had terminal liver cancer, died at his home in New York City, his longtime personal assistant Kate Edgar told the Times.

Sacks was called "a kind of poet laureate of medicine" and "one of the great clinical writers of the 20th century" by the New York Times.

Using a typewriter or writing in longhand, Sacks authored more than a dozen books, filling them with detailed, years-long case histories of patients who often became his friends. He explained to lay readers how the brain handles everything from autism to savantism, colourblindness to Tourette's syndrome, and how his patients could adapt to their unconventional minds.

Sacks' view, as expressed in his 1995 book An Anthropologist on Mars, was that such disorders also came with a potential that could bring out "latent powers, developments, evolutions, forms of life that might never be seen, or even be imaginable."

"The brain is the most intricate mechanism in the universe," he said in a People magazine interview. "I couldn't imagine spending my life with kidneys."

Sacks' own psyche was quite complicated.

Drug abuse, acute shyness

At times in his life he struggled with drug abuse and acute shyness and he suffered from prosopagnosia, a disorder that leaves victims unable to recognize faces.

In 2012 he told a New York magazine interviewer he had been in psychoanalysis for more than 45 years and celibate since the mid-1960s because he was essentially married to his work.

However, in On the Move he wrote of falling in love at age 77 with writer Billy Hayes.

Sacks, a self-proclaimed atheist, was born in London on July 7, 1933, to Jewish physicians. In hopes of keeping him safe from the Nazis' bombing blitz of London during the Second World War, his parents sent him away to a school and the shy young Sacks turned to science.

After attending medical school and practising in Britain, he moved to the United States in the early 1960s where he studied a group of people who contracted encephalitis lethargica. They had been untreated and virtually frozen in catatonic states for decades until Sacks administered an experimental psychoactive drug known as L-dopa.

The drug had an explosive "awakening" effect on the patients but the experiment trailed into failure as they developed tics, seizures or manic behavior and had trouble adjusting to the contemporary world.

'Heaven-and-hell experience'

Sacks wrote about the patients in the 1973 book Awakenings, which led to the 1990 Oscar-nominated movie of the same name, starring Robin Williams as a character based on Sacks and Robert de Niro as one of his patients.

"This had become a heaven-and-hell experience," Sacks told People magazine of his Awakenings case. "But the patients would just have died without having even a glimpse of that life had they not been given L-dopa."

His best-known work was 1985 book The Man Who Mistook His Wife for a Hat, a collection of case studies of people whose brains had misfired, including lost memories, gross perception problems and Tourette's.

Sacks, a professor at the New York University School of Medicine, often considered his own maladies in his books including Migraines, The Mind's Eye about dealing with blindness, and Hallucinations based on experiences with LSD and mescaline.

His autobiography, On the Move: A Life, was released in May.