NORTH SALT LAKE — A man who police say shot at a hunter, SWAT team members and a police helicopter was taken into custody Sunday night.

Officers from several agencies spent several hours attempting to bring the man into custody. The more than five-hour ordeal ended about 10:15 p.m., after the man had barricaded himself in his car.

The man, whose identity was not released Sunday night, hunkered down near 6100 W. John Glenn Drive in the industrial area of Salt Lake City and made his way across the Davis County border into the marshland where the Irvine Hunting Club is located.

During the ordeal, he shot at a hunter, fired at least three rounds at a police helicopter and another round at SWAT team members, said Davis County Sheriff's deputy Scott Harper.

When taken into custody, the man had three self-inflicted gunshot wounds, Harper said. He was transported by medical helicopter to an area hospital about 10:30 p.m.

"Our No. 1 concern is to make sure his injuries are addressed," Harper said. "Then we'll move forward with the investigation."

About 4:30 p.m. Sunday, North Salt Lake police went to check on the man after family members reported that he might be "distraught."

Police were not able to find the man at his home, but they tracked him though his cellphone to the industrial area of Salt Lake City. An airport police officer spotted the man sitting in a black Honda Acura, armed with a shotgun, Harper said.

When approached by the airport officer, the man drove away.

Airport police blocked the roads in the area to keep the man from escaping. Police stopped a vehicle that was leaving the area and talked with two hunters who had been at the club. The hunters' father was still at the club, they told police.

"The two individuals called their father, who was working up there, and told him about (the gunman)," Harper said.

While riding his four-wheeler in the area, the father spotted the man's car. When he stood on his ATV to get a better look, the man shot at him, Harper said. The father then called 911.

Law enforcement agencies from Salt Lake City, the Salt Lake Airport, North Salt Lake, Salt Lake County and Davis County, as well as the Utah Department of Public Safety, all responded to the shooting.

Using the DPS helicopter, officers were able to spot the man "hunkered down in some tall bushes," Harper said.

"He fired a couple rounds at the helicopter," he said. "They were able to stay in a somewhat safe location and continue to observe him."

SWAT teams from Salt Lake and Davis counties were called into the area and used an armored vehicle to attempt to negotiate with the man, Harper said. The man fired again at the DPS helicopter and then at the SWAT teams, he said.

The SWAT team deployed tear gas and then K-9 units to get the man out of his car and take him into custody, Harper said.

"The Davis County SWAT team members are all paramedics, so they were providing immediate care to him," he said.