SANTA MARIA, Calif. -

A former Santa Maria police lieutenant is fighting for his job after being fired in 2012 for an internal investigation that lead to the fatal shooting of another officer.

The officer was being arrested for sexual relations with a minor in the police explorers program, and the former lieutenant Dan Ast is accused of handling the case with negligence.

The hearing between Ast and the city began with opening statements that detailed the night of the attempted arrest in January 2012.

Police tried to arrest another officer, Alberty Covarrubias, for sexual allegations but a shootout ensued instead an and Covarrubias died.

Ast lead the covert investigation and the city claims he facilitated a leak by framing another lieutenant he wanted fired.

But in today's opening statements, Ast's attorney argued his role in the botched arrest operation was minor.

He claims Ast's termination had less to do with the shooting and more to do with the fact that Ast submitted some whistleblowing grievances which detailed what Ast alleged was corruption within the police department.

Ast's attorney also asserts he worked for the Santa Maria police department for 16 years and has never been disciplined.

Ast is fighting to prove the city's allegations wrong and he ultimately wants his job in the police department back.

Monday ended halfway through the police chief’s testimony.

The hearing is expected the last the week.