Gwen Stefani and Blake Shelton
LOS ANGELES, CALIFORNIA - JANUARY 26: Gwen Stefani (L) and Blake Shelton attend the 62nd Annual GRAMMY Awards on January 26, 2020 in Los Angeles, California. (Photo by John Shearer/Getty Images for The Recording Academy) Photo by John Shearer/Getty Images for The Recording Academy

Blake Shelton left fans shocked last week when he announced he would be leaving "The Voice" after season 23. Behind the scenes, the country singer went through a range of emotions before making the decision.

A source told Us Weekly Shelton "really agonized" over whether he should exit the NBC singing competition. Several factors, including his wife, Gwen Stefani, and her kids, helped him reach the "God's Country" singer reach his decision.

Stefani shares three sons, Kingston, 16, Zuma, 14, and Apollo, 8, with ex-husband Gavin Rossdale.

Oklahoma-native Shelton formed a close bond with Stefani's boys and said he is hopeful his time away from "The Voice" will allow him to spend more time with the children.

"Gwen's kids are becoming older, and their school breaks are becoming longer, which allows for the family to spend longer periods of time in Oklahoma," a source told the outlet.

The country singer said he enjoyed his time as a judge on "The Voice" and "loved" mentoring the contestants.

"He was in two minds for a while because the show has given him so much — and certainly way more than just a financial perspective," the insider said.

Filming "The Voice" also "helped him see the good side about living and working in Hollywood after so many years [of being] based in the south," the source noted.

Changes to the show and the intense shooting schedule contributed to his exit.

"Getting to work alongside his best friend Carson [Daly] and then, of course, Gwen was the icing on the cake," the source said.

"But now the show's moving in a new direction without Gwen and others, so it felt right for Blake to bow out as well."

Shelton announced plans to leave "The Voice" after season 23 on Oct. 11 with a lengthy social media post.

"I've been wrestling with this for a while, and I've decided it's time for me step away from 'The Voice' after next season," Shelton wrote at the time.

"This show has changed my life in every way for the better, and it will always feel like home to me."

"The Voice" Season 22 airs Mondays and Tuesdays on NBC.