Lewis Black vividly recalls the day when his Stanford University classmate, Mitt Romney, put on a police uniform, walked behind a mutual friend, and ­announced gravely, “You’re ­under arrest.”

It was, Black said in an inter­view, just one aspect of Romney’s continuation of a prank he had begun during his high school years: impersonating a police officer. Black said Romney was known to put a police-like whirring cherry top on his white Rambler, put on a uniform, and ride around in a “fake police car.”

“I remembered him telling us that he liked to pull people over,” Black said.

Romney’s love of pranks is by now well known, including some that were perceived as crossing the line. Romney has talked about dressing up as a police officer to pull pranks at his Cranbrook prep school in Michigan.

But his continuation of this practice at Stanford, confirmed by a number of his classmates in recent interviews, ­appears to have gone on more frequently and longer than has been generally realized.

Classmate David Lee ­recalled driving around the Stanford campus with Romney in search of students from the University of California, Berkeley, who were known to pull pranks on the Stanford campus. As Romney drove his white Rambler in the dark, he pulled out a “cherry top” whirring light that he brought with him from Michigan. Romney was not wearing a uniform on this occasion.

“He pulled out a portable light that plugged in,” Lee said. “We were just running around campus, I wouldn’t say wildly, but aimlessly, looking for Cal guys. We never found any. I don’t know what we would have done if we had.”

A third classmate, Richard Wall, said Romney wore what appeared to be a security guard uniform when roaming campus in his Rambler with the police cherry top.

“He would occasionally drive around after dark, and he had a flashing light he could hook into a cigarette lighter,” Wall said. “He would find kids making out in a car and give them tickets. It was probably bogus. I don’t think there was any venal intent on Romney’s part. I just think he thought it was funny.”

Romney has acknowledged similar stunts. He was paraphrased in a Boston Globe story in 2005 as saying that he ­remembered “dressing up as a police officer himself and startling his friends and their girlfriends by rapping on the steamed-up windows of their parked cars.”

These accounts follow a recollection from another Romney classmate at Stanford, Robin Madden, who told a publication called The National Memo earlier this month that Romney had boasted of using a police ­officer’s uniform and had displayed it in his dorm room.

“We thought it was all pretty weird,” Madden was quoted as saying. “We all thought, ‘Wow, that’s pretty creepy.’ And after that, we didn’t have much inter­action with him.”

Romney first pulled the ­police act when he was a student at Cranbrook, an elite prep school in his hometown of Bloomfield Hills, Mich. It was late one night when Romney put on the uniform of a state trooper, put a whirring “cherry top” on his car, and pulled up to a vehicle occupied by two couples.

Romney had let the two male friends in the car in on the prank. They had put beer bottles in the trunk ahead of time. When Romney-as-officer pulled up, the two girls in the car thought an arrest was underway.

Romney pretended surprise at discovering the beer bottles, pulled out the two boys, and placed them under fake ­arrest. Romney and the two boys then drove away, leaving the two girls stranded.

“He came up to the car and pretended to be a cop. . . . He asked me to get out of the car and open the trunk, at which point we found the beer,” ­Graham McDonald, one of the friends involved in the prank, said last year in an interview for the biography, “The Real ­Romney” by two Globe staff report­ers. “It was a terrible thing to do. We came back shortly. We didn’t leave the damsels in distress.”

After graduating from ­Cranbrook, Romney spent a year at Stanford, where the campus was being roiled by anti­war protests. Romney was appalled at the antiestablishment mood on campus and famous­ly protested the antiwar protesters.

Accounts differ about whether Romney used the same Michigan state trooper’s uniform at Stanford that he had worn at Cranbrook. Some classmates have said it was a Michigan uniform or a security guard suit. Black described it as a “rent-a-cop” outfit without Michigan markings.

A number of Romney’s classmates said in separate interviews that he sometimes drove people around in a Rambler, the car that his father had built his reputation on while running American Motors Corp. The campus police force also used Ramblers, which may have helped Romney blend in as a supposed officer.

Romney may have risked ­arrest as a result of his actions. According to Michigan law around the time that Romney attended Cranbrook, it was a misdemeanor for individuals to “falsely assume or pretend to be” a police officer.

Under California law at the time, it was a misdemeanor for someone to wear a police-like badge or use a device if such measures were intended to ­“induce” the average person to believe he is a “peace officer.”

Peter Keane, professor of law and dean emeritus of the Golden Gate University School of Law in San Francisco, said that if Romney wore a police uniform or put a siren on his car, then “he was violating the law as it was understood and interpreted at the time. . . . If you did wear a police officer uniform and badge in California, you were arrested and could be prosecuted and convicted.”

Keane, while not having ­direct knowledge of Romney’s actions, said people who impersonate police officers often long to be “an authority figure. There is an underlying psychology of those people that they are power hungry.” Their aim is “being able to direct people as to what they should do and not do,” Keane said.

A Romney campaign spokesman did not respond to a request for comment.

Wall said that Romney’s actions paled compared to some pranks pulled by rowdier Stanford students. “There were far worse things done by people than what Romney did,” Wall said.

Michael Kranish can be reached at kranish@globe.com. Follow him on Twitter @GlobeKranish. He and Scott Helman are co-authors of ‘The Real ­Romney.’