Navy officials have arrested the suspect in a stabbing at Virginia’s Naval Support Activity Portsmouth Annex that put the facility on lockdown Friday and left a victim in critical condition.

Capt. Michael "Jake" Johansson, commanding officer of Naval Support Activity Hampton Roads, says Petty Officer 3rd Class Wilbur Harwell was arrested in nearby Virginia Beach.

The Navy said the sailor who was stabbed in the chest and neck was taken to the naval hospital with critical injuries. The Navy identified him as Petty Officer 2nd Class Justin Powell.

The two men knew each other, Johansson said, although he added that he wasn't sure exactly of their relationship was before the altercation. Officials haven't determined a motive, Johansson said.

Earlier, Navy official Jim Moir told WAVY.com that a Code White was in place at the installation, which is home to Virginia’s Naval Medical Center Portsmouth. A Code White alert can indicate an armed suspect is in the area.

Personnel had been ordered to “shelter in place,” or stay put during the hunt for the suspect and the medical center was closed to inbound and outbound traffic. The lockdown was lifted after Harwell's arrest.

The manhunt came a day after Naval Medical Center Portsmouth practiced an active shooter drill as part of routine training.

"It was fortuitous in that pretty much everybody that was at the exercise yesterday, by face showed up today, so it was nice to have that collaboration," Johansson said about the military and civilian responders.

The Associated Press contributed to this report.