John Bivins was staying in room 204 of the Fairmont inn in San Leandro.
VIDEO: Escaped inmate drives off after shootout with CHP
The manager of the roadside motel says investigators showed up just a few hours after being notified of Bivins' location. They waited all night and watched from upstairs for Bivins to walk outside. Around 9:30 Sunday morning, he finally exited his room.
U.S.Marshals forced him into custody, putting an end to a nearly three-week manhunt.
The manager says someone else booked the room and then let Bivins inside. A car driven by the accomplice was towed from the parking lot.
RELATED: Discarded handcuff key, restraints found in Palo Alto escaped inmate investigation
Bivins has been on the run since November 6th. The 47-year-old and fellow inmate Tramel McClough escaped from a Palo Alto courthouse.
Since then a task force led by the U.S. Marshal has been searching for them. McClough was captured Tuesday. He was spotted at a Walmart in Stockton, but Bivins was able to get away. Authorities say he got in a car and tried to run over a CHP officer and a Deputy U.S. Marshal while they shot at him.
Bivins was later captured on surveillance video at a gas station that night. Both men were facing long sentences for armed robbery.
Bivins is being treated at a hospital and will then be sent back to Santa Clara where he will face additional criminal charges.