A 19-year-old’s attempts to pull a knife sharpener on a Boynton Beach police officer Tuesday night were foiled by a black shoe string, police records show.

Codi Christian Smith reportedly reached toward his waistband late Tuesday when an officer approached him outside the entrance to Bermuda Cay, an apartment complex along the Intracoastal. Someone had called police because the teen appeared to be falling asleep while riding a skateboard in the middle of East Woolbright Road, just east of Federal Highway, records show.

Have you seen them? Wanted fugitives in Palm Beach County

The officer drove a patrol car up near Smith, according to records, and the teen immediately reached toward his waistband and "quickly approached" the car.

Records indicate Smith lives off Congress Avenue, about six miles from Bermuda Cay.

The officer feared Smith had a weapon and told the teen to show his hands. According to the officer, the teen continued to reach into his waistband and leaned over the hood of the patrol car.

The officer felt threatened, according to an arrest report, and drew a Taser.

The officer saw Smith struggle with a long silver metal object poking out of his waistband. Turns out, the object, a long silver knife sharpener with a black handle, was caught on a string.

See who’s been booked into the Palm Beach County Jail

Smith eventually gave up on the knife and walked away from the officer, police records state. He continued to ignore the officer’s commands to put his hands behind his back.

The officer grabbed the teen’s right arm and a concerned citizen grabbed his left, records show. They brought Smith to the ground where the teen was handcuffed.

Smith faces charges of assault on an officer and nonviolently resisting arrest. He is being held in the Palm Beach County Jail in lieu of a $3,000 bond.

Last month Smith pleaded guilty to loitering and resisting an officer without violence. He was arrested on burglary and drug-related charges in November 2015, court records show, but those charges were not filed.