A Los Angeles County inmate was recaptured in Long Beach hours after he escaped during a checkup at a Lakewood hospital.

The unidentified escapee fled custody around midnight when he was taken to Lakewood Regional Medical Center for a checkup, according to the Los Angeles County Sheriff’s Department.

About four hours later, the man was recaptured at a Walmart on South Street near Downey Avenue in Long Beach, where he was seen still in his Los Angeles County jail-issued clothing.

Alberto Mendez contributed to this report.

Editor’s note: This story was corrected to reflect that the Walmart store is in Long Beach, not Lakewood.