A newly released video shows the moment when a Kentucky sheriff pointed his gun at a judge's head before allegedly shooting and killing him. 

The surveillance footage shows Letcher County Sheriff Shawn Stines, 43, and District Judge Kevin Mullins, 54, in the judge's chambers having what appeared to be a heated conversation on Sept. 19 before the sheriff pulled out his gun and pointed it at the judge.

Mullins was seen in the video sitting behind his desk when Stines pulled the gun, and Mullins then raised his hands and attempted to turn away just before Stines fired several rounds at him.

Earlier released footage of the shooting was played in court during a preliminary hearing on Tuesday, according to the Courier Journal.

KENTUCKY SHERIFF SEEN IN FOOTAGE SHOOTING AT JUDGE IN SHOCKING PRELIMINARY HEARING

Kentucky sheriff and a judge moments before the alleged killing of the judge

The newly released video shows the moment when a Kentucky sheriff pointed his gun at a judge's head before allegedly shooting and killing him.  (Letcher County Handout)

The video showed Mullins seeking cover under his desk as Stines fired his gun. The sheriff then approached the judge, who was still under his desk, and shot him twice at close range before leaving the chambers, the footage shows.

Kentucky Detective Clayton Stamper testified that the sheriff surrendered immediately after the shooting.

Stines told police, "They’re trying to kidnap my wife and kid," according to Stamper.

The sheriff and the judge had been friends for decades and had lunch together hours before the alleged killing.

Kentucky sheriff seen pointing his gun at a sheriff

Mullins was seen in the video sitting behind his desk when Stines pulled the gun, and Mullins then raised his hands and attempted to turn away just before Stines fired several rounds at him. (Letcher County Handout)

Stamper said additional surveillance footage from inside the chambers that has not been shown in court or publicly released captured the sheriff using his and Mullins' phones to make multiple calls to his daughter just before the shooting, according to the Courier Journal.

Police found Stines' daughter's phone number saved in the judge’s phone, Stamper said.

Defense attorney Jeremy Bartley declined to reveal a possible motive for the shooting, but authorities reportedly said the incident was being investigated as a possible sex scandal.

KENTUCKY SHERIFF CHARGED WITH FATALLY SHOOTING JUDGE DEPOSED IN RAPE-RELATED CASE DAYS EARLIER

District Judge Kevin Mullins and Letcher County Sheriff Shawn M. Stines

District Judge Kevin Mullins, 54, was allegedly killed by Letcher County Sheriff Shawn M. Stines, 43, in his judge's chambers. (Kentucky Court of Justice; Letcher County Sheriff's Office)

CLICK HERE TO GET THE FOX NEWS APP

"Our investigators seized the two cell phones, and they’re being analyzed," Kentucky State Police Trooper Matt Gayheart previously told the Daily Mail.

Stines announced Monday that he was retiring as sheriff.

He pleaded not guilty to first-degree murder and is being held at the Leslie County Jail. His case was sent to a grand jury for indictment.