The escaped prisoner, Wossen Assaye, was identified by a bus passenger who recognized him on the bus and called police, a law enforcement source told ABC News.
The suspect was arrested in Washington, D.C., by Metropolitan Police Department without incident at 25th and Pennsylvania Avenue SE, law enforcement sources added.
Assaye had been taken to the hospital for injuries sustained during a suicide attempt last Friday, officials said. For the first 24 hours of his hospital treatment, he was watched by Alexandria County sheriff’s deputies, and after that, responsibility for security went to security contractor Allied Protective Services.
At 3 a.m. this morning, Assaye overpowered a female security guard at the hospital and took her gun, Fairfax County Police Chief Edwin Roessler said today after Assaye was captured.
Next, Assaye confronted a male security officer, according to Bobby Mathieson of the U.S. Marshals Service. Mathieson said the male officer fired a shot but no one was hit -- though Roessler said it was unknown who fired the shot.
Assaye then escaped through a hospital stairwell, officials said. Authorities say they don't know what restraints were on him. He was wearing a hospital gown and no shoes at the time.
Authorities said they did not know if the escape was pre-planned.
Assaye fled to a residential neighborhood and broke into the trunk of a 2002 silver Toyota Camry, authorities said. When the owner of the car started to drive to work, Assaye kicked his way out of the trunk and carjacked the vehicle, police said.
The driver was slightly injured during the carjacking, police said.
Around 10:30 a.m., the Camry was found abandoned. Assaye then carjacked another car and fled, police said.
The second car, a 2008 Hyundai Elantra, has also been located, police said after Assaye's capture.
Police said a weapon has been recovered.
A heavy police presence was reported near the hospital, and police vehicles were seen blocking the hospital’s entrances during the search for the prisoner. Hospital employees were being sent to a nearby high school, and a shuttle bus was carrying the employees to work during the lockdown, police said.
Assaye made his initial appearance in a federal courtroom in Alexandria, Virginia, this afternoon. He was charged with one count of escape from custody in addition to the charge he is already facing for armed robbery.
Assaye appeared "heavily shackled" and escorted by four deputy U.S. marshals, a law enforcement source said.
His next appearance will be Friday afternoon.
According to a court complaint, Assaye was accused in a string of bank robberies in eastern Virginia between October 2013 and March 20, 2015. In each situation, authorities say, the perpetrator entered the bank -- often with a cell phone to his ear -- either displayed a handgun or demand note, and verbally demanded money.
Assaye had a criminal history, with convictions for multiple burglary and robbery offenses in 1998 and 1999, and served time in prison between 2000 and May 2013, according to the complaint.
ABC News' Mike Levine contributed to this report.