They were friends from high school, none of them older than 20. Four had gone on to college, and one was about to finish up at their alma mater.

Then, a few minutes after 3 a.m. Sunday, on a wet, curving road in Montgomery County, everything changed for them, their families, their friends.

The car they were in went off the road and struck a tree. Three passengers were killed.

The driver, a 20-year-old Rockville man, left the scene in the Olney area before officers arrived, police said. They said Kevin Coffay was arrested three hours later on charges connected to leaving the scene.

Police said Spencer Datt, 18, of Derwood, was pronounced dead at the scene. Two others, Haeley N. McGuire, 18, and John Hoover, 20, both of Rockville, were pronounced dead at local hospitals.

A fourth passenger, Charles A. Nardella, 19, of Gaithersburg, was treated at a hospital for injuries that were not thought to be life-threatening. The driver was also treated at a hospital, police said. He was being held Sunday night in the county jail.

People who knew them said the four men had all graduated from Magruder High in Rockville and gone on to college. Haeley McGuire was a senior who was about to graduate and start college, friends said.

“We lost a very popular, bright senior,” said Magruder Principal Lee Evans. “Our focus is on supporting the friends and family that were deeply touched by this tragedy.”

Peter Rosenberg, a friend of Datt’s family, said Datt, who had played basketball in high school, graduated from Magruder last year and had just completed his first year at High Point University in North Carolina.

“He loved comedy, music and sports,” Rosenberg said. “Spencer was the funniest, sweetest kid you could ever meet. He brought joy to the lives of everyone who knew him.”

A woman who had known McGuire years ago described her as a bright, vibrant young woman who was “very happy” and “enjoyed life.”

It appeared that her vivacity influenced many of her peers, even those who did not know her well. Max Levin, a junior at Magruder, said many comments were posted after the crash on her Facebook wall, with a common theme: “She really did affect people without even knowing them,” he said. People, he said, wrote that they cherished her, a field hockey player, “for how happy and nice she was.”

Hoover, who was called Johnny, was “a guy who made everybody laugh,” said Magruder student government association president Jake Sherman.

“He was a nice guy,” Sherman said, who always showed “ nothing but respect to everybody he encountered.”

A grandmother of Charles Nardella said he was attending college. She called him “a wonderful young man” about whom she could “not say enough good things.”

Alverda Nardella described his survival as miraculous but said the family felt “so badly” about the others. “It just hits your soul,” she said. “It’s hard to shake.”

The crash occurred a few minutes after 3 a.m. in the 4700 block of Olney-Laytonsville Road. Police said it was not clear why the car left the right side of the road and hit the tree.

It also was not clear where the friends had been or where they were going.

Police said Coffay was charged with four hit-and-run counts and one of attempting to elude police on foot. They said he was arrested outside his home after an intensive search. He is scheduled to appear in court today on a bond hearing.

Grief counselors will be on hand Monday to talk to students at Magruder. Principal Evans said the school may mark the tragedy with a moment of silence or other tribute.

“It’s a heartbreaking tragedy,” said Martha Schaerr, a vice president of Magruder’s PTSA.

“You do everything you can,” to protect children, she said, “and still....”

Staff Writer Justin Jouvenal contributed to this report.