Tim McGraw has revealed he almost quit music following his health battles.

The country singer was performing for a huge crowd at the Yaamava Theater in California over the weekend when he made the revelation. During the show, he praised healthcare workers and thanked them for getting him back on track so he could continue with his career.

"This spring, before I had my final back surgery, things were getting really bad," he told fans at the show in a video shared by Fox News. "So I was seriously contemplating and figuring out how to walk away."

He continued, "I didn't want to, but I didn't think it was going to get better. But it's gotten better."

McGraw then explained he had been through four back surgeries and double knee replacements "in the last couple of years", before revealing the doctor who had performed the knee operations was in the crowd.

As the 58-year-old music icon continued to address his health woes, he also thanked his wife Faith Hill's medical team - adding they were also at the concert.

McGraw revealed Hill had undergone a series of operations on her neck, as well as her hand.

"My wife has gone through quite a few surgeries," the 1883 star shared. "She's had five neck surgeries and she's had a couple of hand surgeries. But her hand surgeon, Dr. Rose, is here tonight."

He added, "We've got some great nurses and staff here with us, who have taken care of us for a long, long time. Give these guys a hand. They got us back up on our feet."