Kim Kardashian and Kanye West took no chances when it came to having a son.

Kardashian underwent an IVF gender-selection process this spring to guarantee she produce a male heir for her husband, according to Us Weekly.

"She only had boy embryos implanted," a source close to Kardashian told Us Weekly.

At a starting price of $17,000, the procedure involves doctors isolating fertilized embryos of the preferred sex in a lab and then transplanting them into the woman's uterus.

"Kim would have happily taken a healthy baby, but being able to choose the sex is the cherry on top!" the source said.

The 34-year-old reality star confirmed she was having a son via Twitter and Instagram on Father's Day.

"Precious moments like this when we were traveling on tour with you are what I live for. You're such a good daddy to North & you will be the best daddy to our new son too!" Kardashian captioned a photo of West reading to their daughter.

The celebrity couple wanted to complete their family with a son and worked tirelessly to conceive a second child. Kardashian underwent in vitro fertilization multiple times and even visited the psychic John Edward for help.

"Kanye loves Nori more than anything, but to make his world complete, he wanted a little boy, an heir," a source close to the rapper told Us Weekly.