An inmate grabbed a sheriff's deputy's gun inside a courthouse Wednesday and shot the officer, then was killed during a struggle with other law enforcement.

Willie Forrest grabbed the officer's weapon and shot him in the arm around 9:20 a.m., said Karen Cole, a dispatcher with the Northampton County Sheriff's office.

As a second officer struggled with him, Forrest fired another shot into the air. A third deputy shot and killed him, Cole said.

Forrest, 37, was serving 56 years in prison for an attempted murder conviction in 2003. He was being transferred from Jackson to a prison in Raleigh at the time of the shooting in the Northampton County Courthouse, according to WRAL-TV in Raleigh.

The wounded officer is in good condition, a

An inmate grabbed a deputy's gun inside a courthouse Wednesday and shot him, then was killed as he struggled with other law enforcement officers.

Willie Forrest grabbed the officer's weapon and shot him in the arm around 9:20 a.m., said Karen Cole, a dispatcher with the Northampton County Sheriff's office.

As a second officer struggled with him, Forrest fired another shot into the air. A third officer shot and killed him, Cole said. The wounded sheriff's deputy was in good condition, authorities said.

Forrest, 37, was serving 56 years in prison for convictions on attempted murder and other crimes. He was being transferred from Jackson to a prison in Raleigh at the time of the shooting, according to WRAL-TV in Raleigh.

The State Bureau of Investigation was investigating.

Forrest was convicted of attempted murder, kidnapping, assault on an officer and habitual assault in 2003. He had several previous convictions for assault, armed robbery, embezzlement and receiving stolen goods.

After his kidnapping conviction, Forrest attacked his lawyer in a courtroom. Five deputies were needed to pull Forrest off of attorney George Hughes, who suffered a skull fracture and other injuries.