Lamar Odom has reportedly checked into rehab to seek treatment.

"Lamar checked into rehab a week ago. He plans to stay for 30 days. It's a substance abuse program, but he was not abusing drugs when he went in. He is clean. This is a precautionary measure," an insider told People of Odom's decision.

Odom suffered a near-fatal drug overdose in October 2015 and underwent a long and difficult rehabilitation process. Although he was spotted at bars and strip clubs in recent months, sources claim he hasn't fallen off the wagon again.

"He wants to stay clear and focused," the insider added.

Ironically, Odom entered rehab right around the time his divorce from estranged wife Khloe Kardashian is becoming official. The couple's divorce will be legally finalized on Saturday, December 17.

"With the divorce from Khloe being finalized and the holidays coming up, he doesn't want to slip up," the insider explained. "He's trying to take care of himself. He really wants to be better. His friends and family encouraged him to go in and he agreed and made the decision."

Odom, 37, and Kardashian, 32, wed in September 2009, but their marriage crumbled when the former NBA star allegedly cheated on her and got wrapped up in drug and alcohol abuse. Although Kardashian initially filed for divorce from Odom in 2013, papers weren't signed until July 2015.

Once Odom was found unconscious in a Nevada brothel three months later, Kardashian withdrew the divorce papers in court to remain by his side throughout his hospitalization and continue making medical decisions on Odom's behalf as his legal wife.

Kardashian thought Odom's drug overdose would scare him into changing his ways, maintaining hope of a future reconciliation. However, Odom struggled to kick his old bad habits, and so the Keeping Up with the Kardashians star filed for divorce for the second time in May.

A source confirmed to People, however, "Lamar is in good spirits." He spent time at home in New York City this summer but recently returned to Los Angeles.

"[It's] a great thing. He's away from the negative influences in New York," another source told the magazine last month. "Everyone who knows and loves him just wants him to get back to his old self, but that will still take some time. He's been through a lot and he's still working on himself."