CBS has found its modern-day “MacGyver” in “X-Men” star Lucas Till, Variety has confirmed.

Till will take on the title character first made famous by Richard Dean Anderson in the network’s pilot reboot of the 1980s television series.

The “MacGyver” pilot is described as a reimagining of the original show, following Till’s twentysomething MacGyver as he gets recruited into a clandestine organization where he uses his knack for solving problems in unconventional ways to help prevent disasters from happening.

Also newly cast as a series regular in the pilot is Joshua Boone, who will play Gunner, MacGyver’s best friend from high school. The duo joins previously announced “CSI” alum George Eads, who will play Lincoln, a man who could easily be written off as an eccentric conspiracy theorist, but he’s a legit government employee with great capability for compassion.

Till’s casting in the titular role marks the end of a lengthy search for the show’s new star. Sources say that many different names had been discussed for the part, including diverse actors.

“MacGyver” hails from writer Paul Downs Colaizzo, who will exec produce with Michael Clear, Lee Zlotoff, James Wan and original producer Henry Winkler, who is back for the remake. David Von Ancken will direct the pilot and will also serve as an exec producer. CBS Television Studios is producing.

Till is repped by APA, manager Tom Sullivan and attorney Howard Fishman of Hirsch Wallerstein Hayum Matlof & Fishman. Up next, he’ll return as the mutant Havok in “X-Men Apocalypse,” which is out this May. Boone is repped by Abrams.