An 18-year-old Queens man tried to board a flight to Peru without a boarding pass days after allegedly stabbing a woman at an East Elmhurst bus stop, police said.

Luis Emmanuel Valencia Ponce was taken into custody early Thursday morning and charged with attempted murder and two counts of assault, according to a police spokesperson.

The attack occurred around 6 a.m. Monday at the intersection of 23rd Avenue and 94th Street, where a 29-year-old woman was waiting for a bus. She was approached from behind by a stranger who pulled a knife and stabbed her multiple times over multiple occasions, according to court documents. The man then fled on foot.

The victim was taken to NYC Health and Hospitals/Elmhurst, where she remains in stable condition, officials said.

Within a few days, Valencia Ponce attempted to board a flight from JFK Airport to Peru without a boarding pass and became disruptive, police officials said, adding he was taken to a hospital where he remained for several hours.

The NYPD then released a surveillance image of the suspect and asked the public for help identifying him. Officials said both Port Authority police and Valencia Ponce's father recognized him. The Port notified the NYPD but ultimately Valencia Ponce’s father surrendered his son to the NYPD’s 115th Precinct.

Police said the attack appeared to be random and that the suspect and victim did not know each other.

Valencia Ponce pleaded not guilty and was held without bail by family court judge Connie Gonzalez. His attorney did not immediately return messages.

Correction: Due to inaccurate information initially provided by the NYPD, this story has been updated to reflect that Valencia Ponce surrendered to police with his father. This story has also been updated with new information.