Mike Locksley, shown as Maryland's interim head coach in 2015. (Toni L. Sandys/ The Washington Post)

Alabama offensive coordinator Mike Locksley has agreed in principle to be Maryland’s head football coach. The school announced his hiring Tuesday evening.

The sides reached a five-year deal with an option for an additional year, according to multiple people with knowledge of the situation. Locksley will earn roughly $2.5 million annually, according to a person with knowledge of the deal.

Locksley’s deal is similar to what DJ Durkin signed when he became the program’s head coach in 2015 and should give Maryland flexibility to hire or retain higher-salaried assistants.

Maryland plans to introduce Locksley at a Thursday news conference.

Locksley, a Washington native, has twice worked as an assistant on the Terrapins' staff. He coached running backs from 1997 to 2002, and he returned as the offensive coordinator from 2012 to 2015. He served as interim head coach for the final six games of the 2015 season after Maryland fired Randy Edsall. When the school passed over Locksley for the permanent job in favor of Durkin, Locksley headed to Alabama to be an offensive analyst.

“I am thrilled to be returning home and to have the opportunity to lead the Maryland football program,” Locksley said in a statement released by Maryland. “This has always been a special place for me and my family, and I am honored to take on this role at the state’s flagship institution. Our goal is to create an atmosphere and environment focused on the total development of our student-athletes. Our focus will always be to help them become more successful in all areas of their life through their association with our program."

Locksley, 48, has helped lead Alabama’s offense to historic heights this season, his first calling plays for the Crimson Tide. Alabama (13-0) beat Georgia to win the SEC championship on Saturday and will return to the College Football Playoff as the top seed and defending national champion. Alabama’s offense averages 47.9 points per game (second nationally), 527.6 yards per game (seventh) and 7.92 yards per play (second). Alabama’s quarterback, Tua Tagovailoa, is a favorite to win the Heisman Trophy. Earlier on Tuesday, Locksley won the Broyles Award, which is given annually to the nation’s top assistant coach.

“Two years ago, I was in the Nick Saban witness protection program,” Locksley said in his speech at the Broyles Award ceremony in Little Rock. “I was out of a job. I just left the University of Maryland as the offensive coordinator, was kind of in between what I wanted to do. ... What an honor and how great it’s been for me and my career to be able to rehabilitate it” at Alabama.

Locksley is expected to remain on Alabama’s staff through the playoff, which will begin Dec. 29 in the Orange Bowl against fourth-seeded Oklahoma, according to a person close to the situation.

“As we narrowed the search for the individual best suited to lead our program, Michael not only stood out for his talent as a coach, but most importantly for the role he has played as a mentor to student-athletes throughout his career and his deep commitment to helping them grow into leaders on and off the field,” Maryland Athletic Director Damon Evans said in the school’s statement. “On the field, Michael orchestrated one of the country’s most prolific offenses at the University of Alabama and has long been regarded for his recruiting prowess."

Locksley is beloved in the D.C. football community and known as a top recruiter of the area. Players he recruited to Maryland include wide receiver Stefon Diggs of the Minnesota Vikings and linebacker Jermaine Carter of the Carolina Panthers, both local products.

Locksley inherits a Maryland program that has been overwhelmed with controversy and turmoil since the June death of 19-year-old offensive lineman Jordan McNair. McNair’s death led to two independent investigations, one that looked into the workout during which McNair suffered exertional heatstroke and another that examined the program’s culture. Since the summer, media reports outlined an abusive culture within the program and the investigation into the program found that problems festered because players feared speaking out. That investigation also reported organizational dysfunction within the athletic department that could have contributed to the football program’s issues. Durkin was fired Oct. 31 after being placed on administrative leave in August.

Locksley’s only other head coaching job ended disastrously when he was fired midseason from New Mexico after accumulating a 2-26 record in just more than two seasons. Locksley also had multiple off-the-field issues.

Before he coached a game at New Mexico, an administrative assistant filed an age and sex discrimination complaint against Locksley with the Equal Employment Opportunity Commission. A few months later, in September 2009, during a coaches meeting following New Mexico’s loss to Air Force, Locksley was accused of punching assistant coach J.B. Gerald in the face. Gerald filed a lawsuit that also alleged New Mexico’s football program had a hostile work environment.

Locksley also had a run-in with a student reporter after the student wrote a column critical of the program. He allegedly confronted the student in an Albuquerque bar and yelled profanities. At the end of his stint at New Mexico, a 19-year-old friend of Locksley’s son was charged with suspicion of driving while intoxicated in a car that was registered to Locksley’s son and wife.

After he was fired by New Mexico in 2011, Locksley returned to Maryland as offensive coordinator and quarterbacks coach. He went 1-5 as the Terrapins' interim coach in 2015, bringing his career head coaching record to 3-31, but he was considered for the permanent job after the season concluded. Maryland hired Durkin, who offered Locksley a position on his staff, which Locksley turned down before joining Alabama.

According to multiple people with knowledge of the situation, the process created friction between Locksley and Evans, who was the athletic department’s second-in-command at the time. Evans faced pressure to hire Locksley this time, according to multiple people with direct knowledge of the process.

Other finalists for the head coaching job included Matt Canada, the interim coach who led Maryland through the 2018 season, and Pep Hamilton, Michigan’s quarterbacks coach and passing game coordinator. Maryland hired the Atlanta-based Parker Executive Search to help with the process.

Read more:

Obstacles for Maryland athletics long predate Jordan McNair controversy

‘A long, arduous task’: Inside the U-Md. leadership crisis

In grief and in defiance, the Terps’ line holds

A timeline of events at the University of Maryland in Jordan McNair saga

Maryland fires athletic trainers who had been on leave in wake of McNair death

Maryland investigators hope school becomes ‘gold standard’ in student-athlete health