An Arizona man was charged with murder after allegedly shooting and killing a friend on the Long Island Railroad in New York in February 2022.

Suffolk County District Attorney Raymond A. Tierney announced the indictment of Nicholas D’Agostino, 20, who is accused of murdering 20-year-old Yusef Staine in an execution-style shooting.

D’Agostino faces charges of second-degree murder and second-degree criminal possession of a weapon.

Investigators claim on Feb. 13, 2022, D’Agostino traveled from Arizona and arrived in Wyandanch to visit Staine. Two days later, the two men, along with two others, took the train into New York City from Wyandanch.

DANIEL PENNY BREAKS SILENCE OVER JORDAN NEELY DEATH: ‘HAD NOTHING TO DO WITH RACE’

File photo of railroad train tracks

Railroad track with a switch to change lane in full perspective focus (iStock) (iStock)

D’Agostino and Staine returned to Suffolk County during the early morning hours the next day, and surveillance footage provided by the Metropolitan Transit Authority (MTA) Police showed the two missed their stop at Wyandanch.

Once the train stopped in Ronkonkoma, the two men exited the train and caught the next one heading west, back to Wyandanch.

While getting onto the westbound train, the DA’s office said in a press release, D’Agostino walked behind Staine and shot him once in the back of the head. Stain collapsed to the ground, the DA said, before D’Agostino shot him once more in the torso.

MARINE VETERAN IN NYC SUBWAY CHOKEHOLD DEATH FACES TOUGH LEGAL ROAD, EXPERTS SAY

After the shooting, investigators learned D’Agostino fled the train station. Suffolk County Police collected additional surveillance video that allowed the department to track D’Agostino’s movements leading up to, during, and following the shooting.

File photo of courtroom and gavel

Inside a courtroom with gavel in view.  (iStock)

Investigators also used cell phone data to track D’Agostino’s movements.

WOMAN SHOVED INTO TRAIN, MAN SLASHED DURING VIOLENT WEEKEND ON NYC SUBWAYS

After a year-long investigation, Suffolk County Police Department detectives arrested D’Agostino on May 18, 2023, in Yonkers, New York, and the next day, he was arraigned in Suffolk County by Acting Supreme Court Justice Steven A. Pilewski.

Judge Pilewski ordered D’Agostino be held without bail. If convicted, he faces up to 25 years to life in prison on the count of murder.

CLICK HERE TO GET THE FOX NEWS APP

"The defendant allegedly executed someone who considered him a friend. This defendant thought he could get away with it because he was wearing a mask and then fled Suffolk County, but he was clearly wrong," Tierney said. "Due to the great investigative work done by our Suffolk County prosecutors, investigators, and police, we were able to determine the defendant’s identity and charge him with this brutal murder. Let it be clear – if you seek to harm our citizens here in Suffolk, you may run, but you cannot hide, because we will continue to pursue you until you are held responsible for your crimes."