STANFORD, Calif. — Stanford has hired coach David Esquer away from rival California to replace the retired Mark Marquess as head of the baseball program.

Athletic director Bernard Muir announced Friday that Esquer will return to the Cardinal, where he played and coached under Marquess. Esquer played on Stanford’s 1987 championship team and was an assistant from 1991-96.

Esquer has spent the past 18 years as head coach at Cal, winning 525 games and taking the Golden Bears to the College World Series in 2011 when he was named coach of the year. He has coached 81 major league draft picks, including five first-rounders.

Marquess retired after 41 seasons at Stanford. He won two national titles and went to the College World Series 15 times.