Massachusetts state police came to the rescue when a dog wandered into a tunnel in Boston and narrowly escaped being hit by traffic.

Surveillance video from the Massachusetts Department of Transportation shows the black and white pup heading toward oncoming vehicles in the Ted Williams Tunnel on Thursday morning.

With cars and trucks whizzing by, it moves from the middle of the lane to a side wall.

A later video clip shows six state police vehicles parked in a staggered formation and a trooper beckoning to the pup, which runs away from the officer but then hops into the backseat of a cruiser.