If only the subways’ rodents were this cute.

Pictures of Edie, the 4-train-riding hamster, have become a hit on the Web, with viewers gushing about the perplexed-looking critter captured “riding” an amazingly accurate model of a subway.

The Post has ferreted out the full story behind the photos, first published on the Flickr site of hamster owner Victoria Balanger, who works as an evidence photographer for the Manhattan DA’s Office.

PHOTOS: EDIE TAKES A TRAIN RIDE

The story of Edie’s wild ride starts way back in 1996, when the DA’s office was preparing for the trial of crazed subway bomber Edward Leary. Prosecutors needed a model of a subway train to show jurors just where Leary detonated his explosives.

Architectural engineer Marie Venticinque was enlisted to construct the tiny train-car replica.

The model did its job — Leary is serving a 94-year sentence for assault and attempted murder — and ever since has sat on a shelf in the DA’s engineering unit.

Enter Balanger, a recent hire to the DA’s photo unit.

“I’m a photographer for the DA’s office and there is a woman there who makes these models [trains, apartments, buildings, etc.] for court cases, as a visual aid for the jury,” the animal lover explained in an e-mail on the Brooklyn-based blog newyorksh- – -y.com.

“The train is perfectly hamster-sized so I brought my super-tame hamster into work yesterday for a little photo shoot . . . I’m really excited about them.”

laura.italiano@nypost.com

