Follow KDKA-TV: Facebook | Twitter

GREENSBURG, Pa. (AP/KDKA) — Police say a Pennsylvania man released from custody immediately stole a car in the jail’s parking lot.

Westmoreland County Prison officials say moments after 36-year-old Thomas Lee Williams was released, he brutally beat a 65-year-old woman in the parking lot Tuesday evening and stole her car with the victim’s 1-year-old grandson in the back seat.

“She did everything she could possibly do to protect herself and her grandson,” Westmoreland County Police Chief Kirk Nolan said.

Police say he continued down State Route 119 until he got into a crash somewhere near Avenue A.

thomas lee williams Police: Man Steals Car With Baby Inside Moments After Being Released From Jail

(Photo Credit: Mugshots.com)

Williams then got out of the car and allegedly tried to carjack another driver but was unsuccessful. He then took off into the woods on foot.

“That’s when local police, Greensburg City K-9 unit, Park Police K-9 unit responded to the area, set up a perimeter, and the K-9 units were able to flush him from the wood line where he surrendered,” Nolan said.

Both the boy and his grandmother were taken to hospitals to be checked out. The child was OK and the grandmother is expected to fully recover.

Police say the Philadelphia man was back in custody Wednesday on $250,000 bail.

Williams pleaded guilty in January 2017 to dealing drugs and was ordered released Tuesday.

No lawyer is listed in online court documents for Williams.

(TM and © Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)