The Dolphins have agreed to a deal with San Francisco 49ers offensive coordinator Mike McDaniel to make him their next head coach, the team announced Sunday.

The Dolphins gave McDaniel a four-year contract, a source told ESPN's Adam Schefter.

McDaniel's hiring marks the end of a nearly month-long search since the Dolphins fired Brian Flores on Jan. 10.

Get our free mobile app

Dallas Cowboys offensive coordinator Kellen Moore was the other finalist for the job.

McDaniel, who identifies himself as multiracial, joins the Pittsburgh Steelers' Mike Tomlin, Washington Commanders' Ron Rivera, and the New York Jets' Robert Saleh as the league's only minority head coaches. The 49ers will receive two third-round draft selections (one in 2022 and another in '23, per a league spokesman) as compensation under the Rooney Rule for developing a minority assistant who was hired for an NFL head-coaching job.

McDaniel, 38, gets his first head-coaching job at any level after spending 15 seasons in the NFL and two in the UFL. He spent one season as San Francisco's offensive coordinator after being promoted in January 2021.

More From KSOO-AM / ESPN Sioux Falls