WAREHAM — A Middleborough college student who allegedly struck and killed a father of two as the man rode his bicycle last month immediately fled the nighttime accident on an unlit street and embarked on a bungled, amateurish coverup, a Plymouth County prosecutor said Thursday.

Eric Megna, an 18-year-old engineering freshman at the University of Massachusetts Dartmouth, pleaded not guilty at a wrenching arraignment at Wareham District Court where the angry and sobbing family of the victim, 58-year-old Michael Dutra of Middleborough, had to be ordered out of the courtroom.

Megna, who showed no emotion as he stood motionless behind a protective panel, was released on $10,000 cash bail on a charge of leaving the scene of a fatal motor vehicle crash. He was driven from court by his mother, who escorted him without comment through a crush of reporters, and is scheduled to return Jan. 8.

George Rizer for The Boston Globe

Eric Megna, 18, was arraigned Thursday in Wareham District Court.

According to law enforcement authorities, Megna left the accident, which occurred in Middleborough, about 7 p.m. Oct. 11, and drove to Lincoln, N.H., where his father owns property. Three days later, a court affidavit says, he concocted an alibi in which he called New Hampshire state troopers to report that his damaged 2006 Jeep Grand Cherokee had been hit by a deer on Interstate 93 in Woodstock, N.H.

When a trooper arrived at the scene an hour later, Megna said the deer had been taken away by a passerby, the affidavit said. New Hampshire troopers reported that they found no vehicle debris at the scene, and no deer fur on the Jeep.

To help corroborate his alibi, the affidavit said, Megna e-mailed a photo of an eight-point buck to his mother as evidence of the collision. But that photo, prosecutor Matthew Libby said, had been taken from a 2009 posting on a website devoted to pictures of road kill.

The affidavit by State Trooper Donald Short also cites e-mails from Paul Megna, the defendant’s father, and an overheard conversation at the father’s Medford apartment. When state troopers approached the apartment Nov. 1, the affidavit said, they heard a man speaking excitedly.

“Listen to me. Do what the attorney said and keep your mouth shut,” the man said, according to the affidavit. “The cops have to prove you were the one driving, and they won’t be able to. Cops are lazy, and the longer it goes they will lose interest. People get off all the time. A black guy killed his pregnant girlfriend and got off.”

On Oct. 20, the affidavit said, Paul Megna sent this e-mail to the defendant’s mother, Stephanie Saniuk: “The reason I am concerned is because he said he was in NH at between 7 and 8 o’clock . . . when the accident occurred. . . . The only problem I have is that he made a cellphone call to you at 7:17 on 10/11, and I called Verizon to see where the call was generated from . . . and she told me south of Boston . . . not NH.”

Authorities said they have tracked the defendant’s trip from UMass Dartmouth to his home in Middleborough and then to New Hampshire on the night of the accident. In court, defense lawyer David P. Sorrenti criticized the accuracy of that investigation. “The timeline the government outlines is pretty much impossible,’’ he said, because of the driving needed to reach each stop.

“There’s no evidence that even puts him behind the wheel of the car,” Sorrenti said after the arraignment. Megna has never been convicted of a crime and has a good driving record, Sorrenti added.

During the hearing, the victim’s family shouted at Sorrenti when they believed he had confused Dutra’s and the defendant’s names as the lawyer argued unsuccessfully for bail of $2,000.

“That’s wrong!” one relative said. Others began crying loudly and clutching one another. Lynch ordered the family removed from the courtroom and took a 15-minute recess. The victim’s relatives were later allowed to re-enter for the rest of the hearing.

After the arraignment, Michelle Dutra, a 27-year-old daughter of the victim, began crying as she spoke with reporters. “It’s heart-wrenching to hear how much thought went into covering this up,” she said.

The victim’s brother, Steven Dutra of Taunton, said that a larger issue is Megna’s alleged failure to provide help to an injured man. “He left my brother there to die,” Dutra said. “I think it was evil. Nobody deserves that.”

Dutra said his brother had been rebounding from an illness and enjoyed bicycling, particularly along the Cape Cod Canal.

At the time of the accident, Michael Dutra was returning from a trip to the grocery store.

Steven Dutra said his family hopes to gain a better understanding of what happened.

“I can’t bring my brother back, but as a family we are not vindictive,’’ he said. “We just want to know what happened. We try to do the right thing. That’s all we want.’’