Former Carolina Panthers interim head coach Steve Wilks he was not unemployed for long.

The San Francisco 49ers plan to hire Wilks to be their next defensive coordinator after DeMeco Ryans was named the head coach of the Houston Texans last week, according to NFL Network.

San Francisco 49ers defensive coordinator DeMeco Ryans during the first half against the Dallas Cowboys in an NFC divisional playoff game at Levi’s Stadium on January 22, 2023 in Santa Clara, California. (Lachlan Cunningham/Getty Images)

Wilks will take over a defense that ranked first in the NFL in points allowed (16.3) and yards (300.6) per game during the 2022 season.

The move comes nearly two weeks after Wilks was ruled out for the head coaching job at Carolina when the Panthers tabulated Frank Reich to run the organization.

STEVE WILKS ‘UNDEFEATED’ AFTER PANTHERS HIRES FRANK REICH AS LAWYERS CLAIM NFL HAS ‘LEGITIMATE CAREER PROBLEM’

Wilks began the 2022 season as the passing game coordinator and secondary coach under head coach Matt Rhule.

When Rhule was fired after a 1-4 start, Wilks took over the team on an interim basis, going 6-6 as head coach and putting the Panthers in contention for the playoffs At the end of the year.

Interim Head Coach Steve Wilks of the Carolina Panthers during warmups before a game against the Detroit Lions at Bank of America Stadium on December 24, 2022 in Charlotte, NC

Interim Head Coach Steve Wilks of the Carolina Panthers during warmups before a game against the Detroit Lions at Bank of America Stadium on December 24, 2022 in Charlotte, NC (Grant Halverson/Getty Images)

While several Panthers players expressed support for Wilks getting the full-time job, Carolina opted for offensive-minded Reich over Wilks.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

After the hiring, Wilks’ lawyers issued a statement criticizing the NFL for having a «legitimate race problem.»

«We are shocked and upset that after the incredible job that Coach Wilks did as interim head coach, which included getting the team back into playoff contention and gaining support from players and fans, he was overlooked for the head coach position [CEO] David Tepper,» Wigdor LLP said in a statement obtained by Fox News Digital.

«There is a legitimate race issue in the NFL, and we can assure you that we will have more to say in the days ahead.»

Carolina Panthers head coach Steve Wilks walks on the field before a game on October 16, 2022 in Inglewood, California.

Carolina Panthers head coach Steve Wilks walks on the field before a game on October 16, 2022 in Inglewood, California. (AP Photo/Ashley Landis)

CLICK HERE TO GET THE FOX NEWS APP

Wilks released his own statement the next day, saying he was «disappointed but not defeated» and wishing Reich the best in Carolina.

The last two defensive coordinators in San Francisco have become NFL head coaches. Robert Saleh was hired by the new york jets in 2021 after calling up the 49ers defense for three years.

Fox News’ Ryan Morik contributed to this report