(CNN) -- A homeless hitchhiker who achieved Internet celebrity by acting as a Good Samaritan with a hatchet was arrested at a Philadelphia bus depot Thursday in connection with the murder of a New Jersey attorney, authorities said.
Caleb Lawrence McGillvary, 24, known on Facebook and YouTube as "Kai the Hatchet Wielding Hitchhiker," is facing a murder charge in Union County, New Jersey, authorities said.
McGillvary was arrested Thursday evening at the Greyhound terminal by Philadelphia police after New Jersey authorities issued a public call for help in finding him, said Union County Prosecutor Theodore J. Romankow.
"I am grateful for the overwhelming response and dedicated effort by the public and law enforcement that led to this arrest," Romankow said in a statement. "I believe that everyone is a little safer with this person off the streets."
Earlier Thursday, Romankow acknowledged the Internet fame surrounding McGillvary, who is crediting with saving two lives in California.
"This man was well-known. That doesn't mean he did not or could not become involved in a crime," Romankow told reporters. "We believe he has murdered someone -- an attorney by the way who was in the county, was well respected, well regarded for well over 40 years.
"As far as we're concerned, I don't care who he is. We're looking for him," the prosecutor said.
McGillvary is wanted in the death of attorney Joseph Galfy Jr., authorities said. McGillvary and Galfy exchanged text messages over the last few days, Romankow said.
"It's more like 'Come pick me up' and 'I'll be there at this time,' " Romankow said. "But not anything of a personal nature."
But investigators believe McGillvary and Galfy had a sexual relationship, Romankow said. "There has been some indication of that on Facebook," the prosecutor said.
Romankow didn't know why the two men were in contact with each other. Investigators also don't know what the motive was for the murder, but they know that the two men were together Sunday evening, the prosecutor said. Galfy was found dead Monday morning in his Clark bedroom, wearing only underwear and socks, Romankow said.
"He was severely beaten," Romankow added.
McGillvary received national attention after CNN affiliate KMPH interviewed him about a February hitchhiking experience in which he used a hatchet to subdue the driver who claimed to be Jesus and struck a utility worker with his car, then grabbed a woman as she provided help at the scene in Fresno, California.
Romankow said Thursday that McGillvary has been known to use the back end of a hatchet.
The utility worker underwent surgery for non-life-threatening injuries, and the driver, who stood more than 6 feet tall and weighed at least 300 pounds, was arrested, the affiliate said.
With long hair sweeping out of a bandana, McGillvary provided a dramatic account of the rescue and gestured how he wielded the hatchet against the rampaging motorist in a "Smash! Smash! Sa-mash!" manner, he told the affiliate. He spoke in the patois of a surfer.
The female bystander, apparently not injured, confirmed the incident in an interview with KMPH. McGillvary's Facebook page says that "Kai saved a woman's life by cleaving a man in the head, with a hatchet, after he had just hit someone with his car." McGillvary's story was featured on "The Colbert Report" and "Jimmy Kimmel Live," the affiliate said.
The murder charge against McGillvary carries a bail of $3 million, Romankow said.
Galfy lived alone, and he wasn't married and had no children, Romankow said.
McGillvary also goes by the names Kai Lawrence, Caleb Kai Lawrence and Kai Nicodemus, authorities said. He has cut his hair to alter his appearance and was last seen at a light rail station in Haddonfield, New Jersey, Romankow said.
McGillvary is homeless but calls himself "homefree," authorities said.
"Authorities believe that McGillvary relies on the generosity of strangers for food, lodging and transportation," the prosecutor said in a statement. "He is considered to be armed and dangerous."