Bus driver Denise Wilson was taking a quick break from work a few minutes past midnight when she spotted a small shadow moving towards her in the distance.

It was cold, about 20 degrees out in late January, so the Milwaukee, Wisconsin, transit bus driver was shocked to see a shoeless little boy wearing only pajamas standing on the sidewalk across the street.

Denise Wilson, a bus driver with the Milwaukee County Transit System, is credited with saving a 5-year-old boy on Jan. 28. Milwaukee County Transit System

“He came out of nowhere, out of nowhere,” Wilson told CBS affiliate WDJT. “I just happened to look over and heard him crying and he was just running up Center.”

Get Breaking News Delivered to Your Inbox

Wilson jogged toward the 5-year-old boy, asking him his name, where his family was — anything that could help her find his home.

“It was shocking and a little frightening for me at first, too,” Wilson said.

The boy was visibly shivering, so Wilson wrapped him in her coat and carried him to a nearby gas station. She bought him some snacks to calm him down, and a man inside gave him a hoodie.

“You still cold? You still a little cold?” she asked, while leading the boy back to the bus.

Missing Boy Saved By Milwaukee Bus Driver Driver Denise Wilson's kindness and alert instincts kept a missing 5 year old safe. Another example of #MCTSExcellence Posted by Milwaukee County Transit System on Wednesday, March 15, 2017

With snacks in hand, the 5-year-old took a seat near the front of the bus as Wilson reassured him everything was going to be all right.

“He ended up falling asleep on the bus,” Wilson said. “He ate his snack and fell asleep.”

While the exhausted child took a nap, Wilson closed the bus door, ending her shift early to stay with the boy until police arrived.

She said a miscommunication among family members led to the child going missing, reports WDJT.

“Police say the boy wandered away from home and credit Denise for making sure a scary situation didn’t go from bad to worse,” the Milwaukee County Transit System said in a statement online.

The driver, who has been on the job for just 6 months, is glad she followed her instincts.

“It all worked out,” she said.