Updated

An hours-long standoff in Virginia ended with one person in custody and a police officer in surgery for a gunshot wound.

Virginia Beach Police spokeswoman Tonya Pierce said the incident began around 6:30 a.m. when officers were serving a search warrant. One officer was shot and another was slightly injured.

The suspected shooter then barricaded his or herself inside the home.

More than six hours later, the barricade situation was peacefully resolved and the suspect was taken into police custody, the Virginian-Pilot reported. Additional information was unavailable.

TWO GEORGIA PRISON GUARDS SHOT AND KILLED BY INMATES; SUSPECTS ARE ON THE RUN

Brian Luciano, president of the Virginia Beach Police Benevolent Association, told reporters that the officer who was shot was headed into surgery to treat a wound in his shoulder. He said the officer was alert and talking.

"It was a relief for everyone to be able to talk to him and wish him the best" before surgery, said Luciano, who declined to name the officer. "When something like this happens, it brings home the seriousness and dangers of the profession. But everyone is thankful and very relieved that he's going to be OK."

Pierce said the other officer sustained “very minor” injuries and was taken to the hospital for evaluation, WAVY.com reported.

The Associated Press contributed to this report.