Obsessive compulsive disorder was a living hell for this Brooklyn photographer.

The condition was so evil it — it convinced Brandon Petulla, 22, that he’d sold his soul to the devil.

“I actually thought I was going insane, and that I’d end up being someone on the street who talks to themselves,” he told Barcroft Media.

“My thoughts were so jumbled that it was almost like I had voices in my head, but it was actually just my OCD.”

While OCD is usually associated with repetitive actions like hand washing, Petulla experienced a specific form of the condition called ‘scrupulosity’ which focuses on religious or moral perfectionism, his doctor said.

Petulla’s OCD went into overdrive when he was 16 and trying to come to terms with his sexuality, he recalled.

He was plagued by thoughts of the devil, horrified by the color red and the number six and so cautious about his food, he stopped eating entirely, dropping to a mere 107 pounds.

Barcroft Media

“At first it kind of started with hand picking, weird habits with my skin, and then it developed into me being incredibly cautious with food, in terms of contamination,” he said.

“That’s the reason I stopped eating. I’d have a thought of ‘If you take this bite, it means you are selling your soul to Satan’ – which is ridiculous but in my head I was like, oh my god I can’t eat this.”

He also started donning a cross, writing out Bible verses and pasting them to the wall and wearing a crucifix to bed.

“I would like go around the house literally blessing objects and draw a cross on them and weird like superstitious things like that,” he said.

Petulla’s father Jimi, 57, told the outlet it was “awful” to see his son like this and brought him to seek treatment with Dr. Eda Gorbis at the Westwood Institute of Anxiety Disorders in California.

By that time, the 17-year-old had more than 5,000 compulsions a day and had dropped out of high school.

Brandon when he was 10 years old with long hair, accompanied by his childhood dog Fred.Barcroft Images

Dr. Gorbis helped the teen get his compulsions under control by having him undertake exercises to control his fears — like covering a room with sticky notes saying “Satan” and “666” and signing a fake contract selling his soul to Satan.

He also spoke with a Catholic priest named Father Andrew about his struggles.

Petulla still struggles with OCD but recently graduated from Parsons The New School for Design in New York with a BFA in photography.

He now works as a freelance photographer and graphic designer.

Whereas he used to be terrified of the color red he no enjoys using it in his work.

“I didn’t want it on my room, I didn’t want it on my body. I didn’t want to see it in my house,” he said.

“But once I started wearing it, I started to actual like the color and now I like love red. I use a lot in my work. I guess it is a symbol of recovery in a sense.”