(d) If after a timely request in accordance with subsection (e), a governmental entity fails or refuses to provide an employee with a defense and the employee retains the employee's own counsel to defend the action or proceeding, or provide representation, such employee is entitled to recover from the governmental entity such reasonable attorney fees, costs and expenses as are necessarily incurred in defending the action or proceeding or providing representation if the action or proceeding or representation arose out of an act or omission in the scope of employment as an employee of the governmental entity and the trier of fact does not find that such employee acted or failed to act because of actual fraud or actual malice. Nothing in this section shall be construed to deprive an employee of the right to petition a court of competent jurisdiction to compel the governmental entity or the governing body or an employee thereof to perform the duties imposed by this section.
Except as provided in subsection (a)(2), nothing in this section shall be construed to require a governmental entity to provide the defense or representation to any employee in a criminal or civil service proceeding.