Life on the run for the Internet sensation known as Kai "The Hatchet-Wielding Hitchhiker" ended when he asked for a cup of coffee.

Authorities are crediting an employee at a Starbucks in Philadelphia with recognizing 24-year-old Caleb “Kai” McGillvary, who was wanted in the beating death of a 73-year-old New Jersey lawyer.

The unlikely pair -- a hitchhiker turned Internet celebrity and a lawyer three times his age -- met amid the neon lights of Times Square and headed back to a squat brick home on a quiet New Jersey cul-de-sac, authorities say.

Days later, the lawyer was found beaten to death in his bedroom, wearing only his socks and underwear.

Once lauded as a hero, McGillvary, 24, is charged with the murder of Joseph Galfy, Jr.

Philadelphia Police Commissioner Charles Ramsey says the coffe shop barista waited on McGillvary on Thursday, recognized him and called 911. McGillvary took off before police arrived.

An officer went to Philadelphia's Center City Greyhound bus station and found McGillvary. He was arrested Thursday evening.

“I believe that everyone is a little safer with this person off the streets,” said Union County Prosecutor Theodore J. Romankow.

McGillvary will be processed in Philadelphia and sent to back to New Jersey in the coming days, Romankow said. His bail is set at $3 million.

An arraignment in Philadelphia isn't expected to happen until at least 4 p.m. Friday.

McGillvary took a star turn in February when he became known to millions as “Kai the Hatchet Wielding Hitchhiker” after intervening in an attack on a California utility worker. McGillvary described using a hatchet he was carrying to repeatedly hit a man who had struck a worker with his car, fending off a further attack.

Galfy was found dead in his Clark, N.J., home Monday, two days after authorities said he met McGillvary in New York City. Galfy, who lived alone, was found by police who went to his home to check on his well-being, Romankow said.

Statements posted on McGillvary's Facebook page following the homicide were “sexual in nature,” Romankow said.

McGillvary's last post, dated Tuesday, asks “what would you do?” if you awoke in a stranger's house and found you'd been drugged and sexually assaulted. One commenter suggests hitting him with a hatchet -- and McGillvary's final comment on the post says, “I like your idea.”

It was a hatchet that helped give McGillvary a brief taste of fame in February when he gave a rambling, profanity-laced interview to a Fresno, Calif., television station about thwarting an unprovoked attack on a Pacific Gas & Electric employee. The interview went viral, with one version viewed more than 3.9 million times on YouTube. McGillvary later traveled to Los Angeles to appear on ABC's Jimmy Kimmel Live!

Kimmel asked him what people were saying to him since the Feb. 1 encounter. “Hey, you're Kai, that dude with the hatchet,” he responded.

Romankow declined to say what object was used in Galfy's beating.

Romankow said McGillvary, who said in his TV appearance he prefers to be called “home-free” instead of homeless, traded on his fledgling celebrity to meet fans across the country.

Authorities know he was in Times Square based on witness accounts, the prosecutor said.

“He was well-known,” Romankow said.

McGillvary spent at least two nights in Galfy's home in Clark, 20 miles west of New York, Romankow said. The dark brick home is neatly landscaped, with carefully-pruned bushes lining a path to the entrance. Red tape labeled “evidence” now is affixed to the front door.

Authorities believe McGillvary took two trips to meet a fan in Asbury Park; Galfy picked him up after the first trip, Romankow said.

On Tuesday, McGillvary boarded a train in New Jersey bound for Philadelphia, Romankow said.

In the popular February interview, McGillvary told the Fox affiliate in Fresno that he was traveling with a man who veered into the utility worker.

After the driver got out of the car, he walked up to the utility worker and allegedly said, “I am Jesus and I am here to take you home.” McGillvary pulled a hatchet from his backpack and struck the driver in the head several times to subdue him, The Fresno Bee reported.

“That woman was in danger,” McGillvary told KMPH. “He just finished, what looked like at the time, killing somebody, and if he hadn't done that he would have killed more people.”

The driver is now facing charges including attempted murder. Last month, he entered a plea of not guilty by reason of insanity, the newspaper reported.

McGillvary also told the television station that he once came upon a man “beating on this woman he calls his” in an orchard and intervened.

“I started smashing him in the head and the teeth,” McGillvary said.

In a Facebook post from May 10, written from a mobile phone, McGillvary thanked the people who “invited me in, partied hardy with me,” and kept him grounded even though he realized how “crazy fame can be in flippin ones life upside down.”

“ive met some of the greatest people in my life in these last three months,” he wrote, “and i wouldnt trade these experiences with you for all the money in hollywood.”

The story and the interview with Kai, went viral (WARNING: There is profanity):

Here is the original story, which aired on KMPH-TV in California's San Joaquin Valley.