A York County man escaped with minor injuries when he was attacked by two masked men who attacked and stabbed him as he was walking in Adams County on Tuesday night, state police said.

Cody Vaughn Hammaker, 23, of Dillsburg, suffered a single stab wound to the back of his right shoulder and wounds to his hands, according to police.

After being stabbed, he made his way to the 600 block of South Baltimore Street in Carroll Township, York County, where police found him walking along the road, Carroll Township Police said.

Township police said they turned over the case to state police in Gettysburg after determining Hammaker actually was stabbed in East Berlin.

According to state police, Hammaker was walking on Harrisburg Street (Route 194) just north of King Street, about 11 p.m. when two men jumped him. The road is also known as the Abbottstown Pike.

Hammaker was stabbed with a knife during the assault, state police said.

The attackers then fled in a blue car, according to police. Both men wore black ski masks, and one also wore a baseball cap.

Hammaker was treated at Holy Spirit Hospital for a minor injury, police said.

Anyone with information about the attack can call the state police in Gettysburg at (717) 334-8111.