LYNN – A Level 3 sex offender with a criminal record dating back to 1986 was nabbed Wednesday on a slew of warrants, drug and weapons charges after he led police on a foot chase through the city.Ralph H. Carty Jr., 57, of 190 Franklin St., #4, Lynn, was charged with trespassing, resisting arrest, three counts of carrying a dangerous weapon, disorderly conduct, fugitive from justice, failure to register as a sex offender, two counts of violation of a city knife ordinance and 12 warrants. Carty was arraigned Wednesday at Lynn District Court by Judge Albert Conlon and ordered held in lieu of $10,000 cash bail. A probable cause hearing has been scheduled for June 16.According to court documents, an officer on patrol on Washington Street spotted Carty, who he previously had tried to take into custody that afternoon on a warrant and failing to register as a Level 3 sex offender in Boston. As the officer started walking toward Carty, he allegedly started to backpedal, threw a red hat and a baton on the ground and ran down Washington Street onto Laighton Street. During the foot pursuit, Carty jumped over several backyard fences, intriguing neighbors who came out onto their porches to watch.At that point, several Lynn police cruisers had set up a perimeter in the area and had a sergeant from the Essex County Sheriff’s Department respond with her K-9 to assist in the search. Police found the red hat and the baton, from which the K-9 was able to get a scent. A few minutes later, the dog traced Carty to a nearby porch, where he was hiding in a crawl space. After first refusing to come out, Carty was placed into custody and taken to Union Hospital for cuts to his hands and face that required stitches.During a search, police found a folding knife in Carty’s jacket pocket, a fixed-blade knife in his pants pocket and a bag of marijuana. After he was treated at the hospital, he was booked on the above charges as well as a warrant issued in Virginia for cocaine possession. Police say the warrant also had warnings on it that Carty was a sexually violent predator and a martial arts expert. Officials in Virginia said they would extradite Carty on the warrant.