New York: As New York City shut down in anticipation of a fearful snowstorm, a resourceful if hungry grey whippet named Burt approached a pile of canned dog food that rose like a mirage in the snowy expanse of Randalls Island.

Burt would soon learn that it was a trap, albeit one prepared with good intentions by a Fire Department lieutenant who had been trying to catch the scrawny, shivering dog since he first spotted him near the Fire Academy more than three weeks before.

“My nickname for it was the Rock,” said the lieutenant, David Kelly, drawing on the name firefighters give to the academy.

Kelly, who works security there on 24-hour shifts, decided that with the storm bearing down, it was time to finally set a real trap to capture the dog and bring him inside. He brought a cage from home, where he has two rescue dogs of his own, and dog food as bait.

He also learnt the dog might be a whippet, and searched the internet for missing dogs of that type in New York City.

And so it was that shortly before laying the trap, Kelly learnt about Burt, who had disappeared from his Harlem home five months earlier and whose owner, Lauren Piccolo, had been posting regular updates to Facebook on her search and reports of sightings.

Seen: by a baseball field in Morningside Park on a September night, one message read. Seen: possibly being walked by a man near Grant’s Tomb. In November, a more mournful message appeared: “Happy 1st birthday Burt ... wherever you are.”

How and when Burt made his way from Piccolo’s apartment on West 120th Street to the sprawling baseball fields and municipal facilities of Randalls Island was not immediately clear. There is a pedestrian bridge linking the island to the East Side of Manhattan around 103rd Street, and pedestrian paths off the Robert F. Kennedy Bridge, which towers over the island.

However the dog got there, he quickly found a friend in Kelly, 50, who urged other night-shift workers to leave out food. “I’d never seen the dog out during the day,” he said. (Apart from Burt, he said, stray cats roamed the island and also found food at the academy.)

So early Tuesday around 2am, as the snow collected around the Fire Academy on the east side of the island, he left food in the cage, lashed a lanyard to the gate, and waited.

Burt appeared, but managed to run off with the entire plate of food — it had frozen in the cold. Luckily, Kelly said, the dog returned for more; he pulled the line and snapped the cage shut.

Hours later, as the storm subsided, Burt was back at home for the first time since the summer, when he slipped his collar and bolted while on a walk.

“He’s on the couch now,” Piccolo, 35, said in an interview. He was expected to make a full recovery.