In David Shaw’s first season as Stanford head coach after replacing Jim Harbaugh, he had Andrew Luck at quarterback. Of course, the Cardinal were good.

But this season, without the No. 1 pick of the Indianapolis Colts, Stanford was expected to fall back in the Pac-12 pack.

That didn’t happen. Instead, Shaw orchestrated a third consecutive 11-win season in which the Cardinal won the Pac-12 championship and will go for win No. 12 in the BCS Rose Bowl. His name was repeatedly mentioned as a candidate for other vacancies, even linked to possible future NFL openings.

On Wednesday, Shaw agreed to a long-term contract extension, the university announced. Terms of the deal were not released.

"David has demonstrated great success as a leader within the Stanford community and as a mentor to scholar-athletes who wear the Cardinal uniform," Stanford athletic director Bernard Muir said in a statement. "This agreement provides added stability and reassurance that David will be at the helm to secure our football program's long-term sustained success."

Before replacing Harbaugh, Shaw was offensive coordinator for four seasons.

“My family and I would like to thank athletic director Bernard Muir for being very proactive throughout this process," said Shaw, a wide receiver at Stanford from 1991-94. "I am looking forward to seeing our athletic department continue to grow under his leadership."

Shaw is 22-4 in two seasons with a second BCS bowl appearance ahead. He also spent nine seasons as an assistant in the NFL with the Eagles, Raiders and Ravens.