The suspects — two men and two women — were arrested Thursday night at Dog Beach in San Diego, a gathering place for the homeless. The police in at least three states joined forces to find them, partly with the help of technology that reads license plates and that tracks phones, officials said.

Image Amos Beede

They fled Vermont after the attack and ended up in Roswell, N.M., where one of them had relatives, the police said. There, one suspect, Erik Averill, 21, was briefly taken into police custody after being accused of assaulting his partner, Myia Barber, 22, who is also a suspect in the fatal beating. But Mr. Averill was released, and the four continued their journey to California.

The police identified the other two suspects as Allison Gee, 25, and Jordan Paul, 21.

The four are being held in California on warrants accusing them of second-degree murder, Chief del Pozo said. It was not immediately clear when they would be sent to Vermont to face the charges.

The chief said the beating started over a dispute in the homeless camp; someone smeared feces on a tent from the south side of the encampment, and Mr. Beede was believed to have reacted by dumping urine in a north-side tent, the chief said.

Mr. Beede, 38, was not homeless. He had an apartment in Milton, but he was staying with friends at the encampment over the weekend because the local bus was not running, the police said.