TUSCALOOSA, Ala.—A gunman stood outside of a crowded downtown bar and opened fire from two different positions early Tuesday, sending patrons running or crawling for cover in a chaotic and bloody scene. At least 17 people were hurt as bullets ricocheted and glass shards and brick chunks fell around the nightclub.

Nathan Van Wilkins, 44, surrendered about 10 hours after the 12:30 a.m. shooting near the University of Alabama campus, police said. The rampage started a couple of miles away about 45 minutes earlier, police said, when Wilkins knocked on the door to a home and waited for a person to answer it. He then started firing, wounding the person.

Wilkins was also suspected of setting three fires to equipment or property owned by his former employer, an oil and gas company.

Police were not sure of a motive. They were investigating whether the shootings came from a dispute between rival motorcycle gangs.

There were signs Wilkins' life was unraveling.

He divorced from his wife of 16 years around 2005 and a credit union last year tried to garnish wages at his then-employer, Capstone Oilfield Services, to collect a more than $15,000 debt but couldn't because he had declared bankruptcy. And the co-owner of the FedEx store where Wilkins turned himself in said Wilkins talked about being high on drugs during the shootings.

Outside the Copper Top bar in downtown Tuscaloosa, pools of blood were visible Tuesday. A trail of bloody footprints could be seen on the sidewalk for about two blocks before crews cleaned the mess.

"There were sparks coming off the ground and then I felt a sting and I knew I'd been hit," said Rachel Studdard, who was sitting on the bar's patio with a group of friends, enjoying the 50-cent draft beer special when the shooting started.

A bullet hit Studdard's toe, and debris hit her in the side and in the leg. She was using crutches to walk Tuesday and still had dried blood on her leg.

The shots fired so quickly it sounded like automatic gunfire, said Studdard, who recently graduated a two-year college and plans to attend the university in the fall. Studdard said she and her friends go to the Copper Top every Monday night because of the beer special.

Elizabeth Walters was inside when the shooting began. She described a ghastly scene of people clutching wounds as blood splattered on the floor.

"It sounded like it would never end," Walters said. "There was a lull and then it started up again."

After the two bursts of gunfire ended, the music in the bar continued to play for several minutes until someone turned it off.