FREEHOLD -- Family and friends of missing 19-year-old Sarah Stern had always held out hope she'd be found safe, but with their hopes crushed, they tearfully faced her alleged killer and accomplice in a Monmouth County courtroom on Thursday afternoon.

Possibly ending the mystery of whether the missing teen was the victim of foul play, Monmouth County authorities charged two of her former high school classmates - Liam McAtasney and Preston Taylor - in Stern's death, alleging they tried to cover up the killing by throwing her body into the Shark River the next day.

With a plan to rob her, McAtasney went to Stern's Neptune City home on Dec. 2 and strangled her, prosecutors said.

After Stern's death, McAtasney called Preston Taylor, also 19, and asked him to dispose of the body and of evidence of the crime, said Monmouth County Prosecutor Christopher Gramiccioni.

Using her car, the pair drove her body a couple hours later to the bridge over the Shark River in Belmar early the next morning and threw it over the side, prosecutors said. An investigation started soon after, when her car was found still on the bridge, the keys still in the ignition.

Stern's father, widowed three years ago, sat in court Thursday weeping as the former classmates of his only child faced Superior Court Judge David Bauman.

"We had hope up until last night. Up until we were informed, we had hope," Charles Stone, attorney for the Stern family, said after court. "The family and friends always had hope."

Stern grew up in the same community and attended Neptune High School with McAtasney and Taylor, according to school records. Graduating in 2015, Stern played softball and was on the swim team while McAtasney was on the school swim team and Taylor was on the track-and-field team, the records show.

On her Facebook page, Stern posted a prom photo of her and Taylor.

She and McAtasney volunteered in 2013 with the Bradley Beach Fire Company, according to school records.

McAtasney was charged with murder, felony murder, conspiracy, hindering apprehension and disturbing human remains.

Taylor was charged with conspiracy, hindering apprehension and disturbing human remains.

While they await detention hearings in the coming weeks, McAtasney and Taylor, who both live in Neptune City, remain in the Monmouth County jail in Freehold.

Assistant Monmouth County Prosecutor Meghan Doyle said she would seek to have both of them remain behind bars until their case is resolved. McAtasney has a detention hearing scheduled for Feb. 14 and Taylor for Feb. 7 at which time, their respective attorneys have said, they will argue for their release.

Stern's body has not yet been found. Gramiccioni said he suspects that's because of the strong river and ocean currents.

He said his office had hoped until just a few days ago - when tips started solidifying - that Stern would be found alive and unharmed. Even around Christmas, his office put out another social media blast with the hope of some "Christmas miracle," he said.

He wouldn't divulge what specifically led authorities to McAtasney and Taylor but said tips coming in over the past several weeks "helped us hone our investigation to go in a particular direction that led us to the charging of these two individuals."

The prosecutor's office joined the investigation into Stern's whereabouts two days after the vehicle was found on the bridge. On Dec. 10, a group of 80 people gathered in Ocean Grove to search the area surrounding the bridge for any clues.

In a video interview with NJ Advance Media, Sarah's father was at a loss for words as to why his daughter went missing.

"It's not like Sarah at all and we just don't know," he had said. "Everyone that talked to her in the days leading up to that, she seemed just fine. It's a mystery."

Sarah Stern was well-liked by her peers and teachers, her father had said. She had developed an interest in photography and digital media, and continued to pursue a career in those areas at Brookdale Community College for two semesters.

Her father said Sarah Stern traveled the world to attend digital media conventions, making friends with others that shared her interests in Australia, London and Canada.

After weeks of chasing down leads, the case had gone cold.

Michael Stern said in an interview at the end of December that spending Christmas, Sarah's favorite holiday, without his daughter was especially hard.

"I feel lousy and heartbroken," he said. "They haven't come up with too many new leads. There are so many unanswered questions. We're at a loss, really."

NJ Advance Media reporter Alex Napoliello contributed to this report.

MaryAnn Spoto may be reached at mspoto@njadvancemedia.com. Follow her on Twitter @MaryAnnSpoto. Find NJ.com on Facebook.