MESA, Ariz. — After an argument in a motel, a gunman went on a deadly rampage through a quiet neighborhood here early Wednesday, leaving one man dead and at least five others wounded before being captured, the authorities said.

The shootings began at the Tri-City Inn in Mesa, a suburb of Phoenix, and continued to three other locations.

They prompted a four-hour manhunt, with SWAT teams from the local Police Department and several other area agencies swarming the neighborhood, knocking on doors, stopping and searching cars, tramping through yards, peering over fences and telling terrified residents to stay inside.

The gunman had stolen a car during the spree, leaving the police unsure if he remained in the area. Hours later, the police arrested a man just blocks from where the violence had begun, escorting him from a two-story apartment building. He wore a police-issued head-to-toe white body suit, and his hands were wrapped in black gloves and shackled in front of him.