Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Jarring videos showing the moments when an Albuquerque police officer was shot several times by his own lieutenant during an undercover operation were released Thursday, following the settlement of a lawsuit that awarded the wounded officer $6.5 million.

"I didn't know it was you!" says Albuquerque Police Department Lt. Greg Brachle moments after putting at least eight bullets into APD Officer Jacob Grant in January 2015.

Video from Brachle's lapel shows him running up to a vehicle that Grant was sitting in with suspects and yelling "gun," then promptly firing his weapon.

"Oh s---, that was Jacob! F--- me!" Brachle is heard saying. "Are you OK?" Brachle asks Grant. "No," Grant answers.

An officer is heard yelling "Jacob hang in there man!" after the accident. The lawsuit later filed by Grant said the officer lost 80 percent of the blood in his body.

A suspect asks why they were being shot at. The charges against the two suspects in the undercover drug operation were eventually dropped, according to NBC affiliate KOB.

Grant on Wednesday settled the lawsuit he filed against the city and Brachle for $6.5 million.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The city will also cover Grant's medical expenses for the rest of his life and he will receive medical retirement, according to a statement sent to NBC News from City Attorney Jessica Hernandez. "This is an important part of ensuring that Jacob and his family are taken care of going forward," Hernandez said.

Brachle was accused in the suit of missing a morning briefing about the potential drug bust and emptying his clip in the direction of the car Grant was in, according to KOB. The officer and lieutenant had a two-year working relationship, the suit said.

The lawsuit also said that Grant has had to undergo numerous surgeries since the shooting.

Grant thanked APD police officers, APD Chief Gorden Eden and his medical staff in a statement following the settlement.

"While we cannot change or undo what has occurred, we are hopeful that this incident will be positively used to improve law enforcement training, practices, policies, procedures, accountability, and community relations," the statement said.

The police department said following the announcement of the settlement that it would implement new policies following a 30-day department suspension of undercover operations.

The policies include mandatory attendance at all briefings, increased training for officers and a change of leadership for Grant's former unit. Brachle retired from the department March 7, according to KOB.

Changes we've made since Jan. 2015 blue on blue shooting. pic.twitter.com/R53ZjCt3Ep — Albuquerque Police (@ABQPOLICE) March 30, 2016

The Department of Justice opened an investigation into the APD's use of force techniques in 2012, long before Grant was shot. The investigation found an unreasonable use of deadly force within the department and a particular disregard for the rights of mentally ill people in the city.

An approved settlement between the Justice Department and the APD following the investigation proposed "revisions to policies, procedures and practices" regarding use of force, specialized units, crisis intervention, training, misconduct investigations, supervision, recruitment, officer health and community engagement.

"As we move forward, we need to take a hard look at the circumstances surrounding the shooting of Officer Grant by a fellow APD officer and learn from this tragedy," Albuquerque Mayor Richard J. Berry said after the settlement of the Grant lawsuit.

"Everything possible needs to be done to avoid incidents such as this in the future. We owe it to our officers and to our community," Berry said.

Related: Fatal Shooting of New Mexico Man Sparks 'Killer Cops' Protest

Following the release of the lapel videos Thursday, which had been requested in Grant's original lawsuit, Eden, the police chief, pledged that the department is doing all it can to prevent other accidents.

"The community and department are deeply affected by this tragedy. As hard as it is to watch and review this video, it is imperative we learn from it," Eden said. "We immediately upgraded undercover officers' training and equipment following this operation and improved supervision, communication and our procedures."