Kim Kardashian has undergone a short but painful procedure to alleviate some of her fears ahead of giving birth for the second time, revealing that her baby is no longer breech as a result.

The reality star, who is 37 weeks pregnant with her second baby, a son, took to her own website to say that the baby was no longer in the breech position, as she had discovered the week before.

“This weekend, I checked into the hospital and underwent a procedure called an external cephalic version (ECV), which is done to manually turn the baby from a breech position to a head-down position,” she wrote.

Kim KardashianKim Kardashian's baby is no longer in the breech position

Kardashian, 35, added that the procedure was risky as it entailed the possibility that her water might break or that the baby’s heart rate would drop as it was turned in the womb. In either case, the four-strong team of doctors was prepared for an emergency caesarean if that happened.

More: Kim Kardashian reveals fears ahead of birth of second baby

“They don’t give you any pain medication, and let me tell you: This was soooooo painful. Probably more painful than childbirth,” Kardashian said, who was joined at the hospital by her sisters and husband Kanye West, shared. “BUT it worked!!!”

The baby is now in the “right position,” and the reality star said “it feels so good to not have the stress of thinking I need a C-section.” In the last month, she has spoken on a couple of occasions that she's felt very stressed about her second pregnancy.

Kardashian is due to give birth to her son – rumoured to named Easton – next week, and until then is trying to shake off a cold and a sinus infection. She also revealed in her post that her sister Kourtney is taking her 2 year old daughter North off her hands for a few days so that she can recover.

“I’m going to have North have a sleepover with her cousins for the next two days so I can really sleep and get better,” she said. “She loves sleepovers and I really need this time to get better. I haven’t been able to sleep and just need to catch up.”

More: Khloe Kardashian reveals how she and her sisters still call Caitlyn Jenner ‘Bruce’