Johnny Dawkins, whose job seemed on shaky ground until the Stanford men reached the Sweet 16 of the NCAA Basketball Tournament last season, has been given a contract extension.

The terms of the new deal, announced Wednesday, were not announced.

Dawkins’ previous deal ran through the 2015-16 season. After a disappointing 2012-13 season, athletic director Bernard Muir had given him an ultimatum: He needed to make the Big Dance last year to keep his job. He did that, and now comes the payoff.

“Johnny Dawkins is a phenomenal educator and tireless worker,” Muir said in announcing the extension. “Our on-court success last year combined with ongoing academic accomplishments and the overall development of our student-athletes illustrates Johnny’s ability to lead this program into the future.”

Stanford (23-13, 10-8 Pac-12) made the Sweet 16 for only the fifth time in school history with wins over No. 7 seed New Mexico and No. 2 seed Kansas. The Cardinal tied for third in the Pac-12 despite losing two starters and two key reserves to season-ending injuries. They finished 5-2 against top-25 foes.

One of the other highlights of the season was a 53-51 victory at No. 10 Connecticut on Dec. 18, the only non-conference loss for the NCAA champion Huskies.

“Being part of the Stanford family is special and there is no place I’d rather be,’’ Dawkins said in a statement.

His current recruiting class is ranked in the top 15 in the country by various services, as high as ninth by ESPN.com. Reid Travis, a 6-foot-8 forward from Minneapolis, is Stanford’s seventh McDonald’s high school All-American and the first since twins Brook and Robin Lopez in 2006.

The other three recruits – guard Robert Cartwright of Pasadena and forward Michael Humphrey and guard/forward Dorian Pickens, both of Phoenix, are also ranked as four-star prospects.

Dawkins, who serves on the NCAA Division I Men’s Basketball Ethics Coalition and NABC Board of Directors, has a 117-87 career record with four postseason appearances.

He and his staff helped Landry Fields, Josh Huestis and Dwight Powell develop into NBA draft selections. Fields went in the second round in 2010, and Huestis and Powell were taken in the first and second rounds respectively in 2014.

Additionally, Dawkins’ teams produced the most All-Pac-12 All-Academic selections of any school in each of the past five years.