Photo by WENN.com

Kanye West says he narrowly escaped being locked up on a mental ward following his bizarre presidential campaign stop in South Carolina over the weekend.

The father-of-four took to Twitter on Monday night to accuse his wife Kim Kardashian West of trying to lock him up on a mental ward.

Comparing his life to the Black character in the movie Get Out, the 43-year-old rapper made headlines when he held his first campaign rally and tearfully admitted that he wanted Kim to abort their daughter North West.

Kim Kardashian, Kanye West

Kim, 39, was reportedly "furious" over what Kanye said during the rally, and she expressed concern about him having another bipolar episode.

The Yeezy star, who is holed up on his $14 million ranch in Wyoming, told his Twitter followers his wife and mother-in-law attempted to have him "locked up".

"Kim tried to bring a doctor to lock me up with a doctor," he tweeted on Monday. "Kim was trying to fly to Wyoming with a doctor to lock me up like on the movie Get Out because I cried about saving my daughters life yesterday."

"Everybody knows the movie get out is about me" and "If I get locked up like Mandela Ya'll will know why."

Get Out is a horror flick by director Jordan Peele about a young Black man who visits his white girlfriend's family only to discover the sinister real reason for their invitation.

Joseph Marzullo/WENN.com

Kanye also addressed Kim's former sex tape, writing: "I put my life on the line for my children that North's mother would never sell her sex rape [sic]. I put my life on my God that Norths mom would never photograph her doing playboy and that's on God I'm at the ranch … come and get me."

Kanye then turned his attention to mother-in-law Kris Jenner, tweeting: "Kriss don't play with me you and that calmye are not allowed around my children Ya'll tried to lock me up [sic].

JACK / BACKGRID

"I love my wife My family must live next to me It's not up to E or NBC anymore."

Elsewhere in his tweets, Kanye revealed that actor Shia LaBeouf was set to star in his first Yeezy collaboration with GAP but didn't show up.

Later, Kanye insisted he was going to "focus on the music now", and plugged his new album Donda - named after his late mother - which is due for release on Friday, July 24.

Kim and Kris have yet to respond to Kanye's claims on their social media pages.