David had just graduated college when he first decided he wanted to cut off his leg.

It had plagued him for years. He considered it “alien,” something not part of his body, and even propped himself on his “good leg” to avoid using it.

He locked his bedroom door, fashioned a tourniquet out of baling twine and an old sock and propped his leg up against a wall to stem blood flow.

Two hours later, the pain too intense to continue, he released the binding. His leg would live another day — but not, he hoped, for much longer.

David and others like him suffer from a rare psychological condition called body integrity identity disorder, where they sufferer desires to amputate a healthy limb. The majority of BIID sufferers are middle-aged white men and the most commonly requested amputation is of the left leg.

Journalist Anil Ananthaswamy discusses the connections between the mind and the body in diseases like Alzheimer’s and schizophrenia in his new book “The Man Who Wasn’t There”— but his exploration of BIID sufferers is its most fascinating and bizarre chapter.

Ananthaswamy shows how emerging neuroscience is helping us better explain the mechanisms behind BIID, which has long been dismissed by the medical community as a fetish and perversion.

BIID was first described in the late 18th century as a case study: An Englishman traveled to France to ask a surgeon to remove his leg. When the doctor refused, the man held him at gunpoint and made him perform the operation, only after writing him a thank you note with money, explaining that his leg had been an “invisible obstacle” to his happiness.

It took a hundred years for the condition to be openly discussed in a serious academic paper, which described “apotemnophilia,” the desire to be an amputee.

But the condition was placed under the banner of paraphilia, or sexual desires, and was relegated for years as a fetishistic sexual impulse.

I have never heard of one who is not pleased to have a limb amputated. - Researcher Paul McGeoch

But researchers recently began to question that diagnosis.

University of Zurich research scientist Peter Brugger studied the brains of those with BIID and found that the right superior parietal lobe, a brain region believed to aid in the construction of body maps, were thinner in those with BIID.

Brugger believes that BIID has much in common with phantom limb, or the feeling of pain or sensation in the area of a limb that had been removed.

“I began to think of these two conditions as mirror images,” he wrote in an essay in 2012. “Experiencing a leg as alien could be seen as ‘incarnation without animation’ — the body part had developed normally in the physical sense, but was not being properly animated by the brain. It was flesh without a soul.”

Another study followed two patients — a 29-year-old man who wanted his leg below the right knee to be amputated and a 63-year-old who wanted the lower part of his left knee and everything below his right thigh removed.

It’s interesting to note, the author points out, that BIID patients can precisely point out where the part of their limb feels foreign and this ability to find that spot remains stable over time, which shows researchers that the “condition is neurological rather than psychological.”

The researchers conducted skin conductance response studies by pricking the areas of the leg with a pin.

When the two men were pricked on the part of the limb that was foreign, the skin conductance response was two to three times more intense than when the pinprick was on the wanted part of the limb.

BIID sufferers have aligned themselves with the gender identity disorder movement, even calling themselves “trans-able.” They believe that they have been born in the wrong bodies — or more specifically with the wrong body part.

David had just graduated college when he first decided he wanted to cut off his leg.

But there are serious ethical issues with treating BIIDs with surgery. In 2000, a Scottish surgeon lost his license after removing the healthy limb of a 28-year-old patient. One surgeon in Mexico was jailed for performing illegal amputation surgeries.

Bioethicist Arthur Caplan, now at NYU, said that it was “Absolute, utter lunacy to go along with a request to maim someone.”

Amputees studied by scientists, however, do not view it as maiming. The feeling of relief is the most common emotion expressed by patients post-surgery.

“They are universally happy. I have never heard of one who is not pleased to have a limb amputated,” researcher Paul McGeoch told the author.

To respond to the growing desire of BIIDs to move forward with illegal surgeries, an underground surgery facilitator world has sprung up — with surgeries costing anywhere from $6,000 to $25,000.

After another failed attempt to amputate his own leg — in the BIID parliance, it’s called “DIY amputations” — using dry ice, David decided to call in an expert.

Using the underground channels online, David made contact with a “gatekeeper,” a person who had undergone the amputation surgery and now helps others find willing surgeons to do the same.

David was admitted to an unnamed hospital for vascular surgery. While there, the surgeon and his team (who were also in on the plot), claimed that his leg was compromised and had to be amputated.

He had finally gotten what he wanted, but was David happy?

“He said he had no regrets,” Ananaswamy writes. “It was as if for the first time in his life, David was whole.”