According to MPs cited anonymously by the daily Globe & Mail and others, Harper spent as much as 15 minutes in the tiny space off a meeting room where he and his Conservative caucus were meeting.
Just outside the room, a firefight was erupting in the main Hall of Honor between the gunman and security forces that ended in the assailant's death.
Harper initially sought to escape the room through a side door, but was urged to stay put.
"Someone knew there was a closet there, so they stuck him in there," a source told the Globe & Mail.
More From This Section
Meanwhile, several Tory MPs began fashioning spears out of flagpoles to protect themselves.
"These guys were up there holding these spears ready to impale anyone who came in," the source said.
News images of the frantic scene also showed antique tables and green leather chairs stacked against the door as a barricade against the gunman.