A convicted serial rapist took a woman prison counselor hostage for more than six hours Monday at a state prison before he was killed by a sharpshooter (search), authorities said.

The sharpshooter, a member of a Corrections Department emergency response team, pulled the trigger after seeing that "the hostage was in imminent danger," department spokeswoman Beth Welch said.

It was not clear how many shots were fired in the confrontation in a prison office, according to the spokeswoman.

The hostage was taken from the prison to a hospital, Welch said. It was not immediately known if she was injured.

The inmate, Scott A. Miller, 45, was believed to have a homemade knife when he took the woman hostage in the maximum security area of the Delaware Correctional Center (search) in midmorning, and negotiations continued through late afternoon.

Officials said Miller was sentenced to 699 years for a series of rapes in 1997, in which nine women were assaulted.

The shooting that ended the standoff took place in a counselor's office, Welch said. It was not known if the office was that of the hostage, or how Miller first came in contact with her.

Carl Danberg, assistant to the commissioner of corrections, would not provide details on how the hostage-taking occurred.

The facility is the state's main prison and holds about 2,400 inmates.