Updated

A stubborn motorist who became an Internet celebrity after video of him being stunned with a Taser by a Utah Highway patrolman appeared on YouTube will receive $40,000 as part of a lawsuit settlement with the state, the Utah attorney general's office said Monday.

Click here to view the video.

Jared Massey claimed in civil lawsuit filed in January that his civil rights were violated because Trooper Jon Gardner fired his Taser before telling him Massey was under arrest.

The confrontation was widely viewed on the Internet after Massey obtained a copy of a video taken by the cruiser's dashboard camera.

The video has been viewed on YouTube at least 1.7 million times and shows Gardner drawing his stun gun after the 28-year-old Massey — outside his vehicle to proclaim his innocence — refused to accept a speeding ticket.

Massey's attorney, Bob Sykes, said he's pleased with the settlement offer.

"They made what we consider to be a very fair offer of a significant amount of money," he said.

The Highway Patrol said the trooper's use of the Taser was justified, but that his attitude was a problem. They put Gardner on administrative leave for a few weeks and said he received training in conflict resolution. Gardner was primarily put on leave for his own safety after state officials received numerous complaints.

Sykes said state attorneys offered to settle the lawsuit before ever officially responding to it, probably because of the video evidence.

"It's pretty damaging," he said. "The force used under these circumstances was nothing less than outrageous."

The Utah Highway Patrol has declined to make Gardner available for comment.

As part of the settlement, the lawsuit against Gardner and potential claims against the Utah Highway Patrol, Utah Department of Public Safety and the state of Utah are being dismissed.

"We think this is a legally defensible case because Trooper Gardner acted reasonably to avert a volatile and potentially dangerous confrontation on the side of a busy highway. We recognize, however, that this is a close case," Assistant Attorney General Scott Cheney, who represented Gardner, said in a statement.

The attorney general's office said defending the lawsuit in court would have been a lengthy and expensive process and that settling was more cost-effective.

Massey paid a $107 fine to settle his ticket for speeding in a construction zone. He was stopped by Gardner on U.S. 40 near Vernal in eastern Utah on Sept. 14.

On Nov. 30, Gardner's superiors cleared his use of the stun gun. They said Gardner felt threatened when Massey turned his back on the trooper and put a hand in his pocket while stepping back toward his vehicle.

But officials also said the trooper could have explained to Massey that he risked being arrested for refusing to sign a speeding ticket.

The signature isn't a legal requirement in Utah, but troopers make a practice of obtaining it as a motorist's pledge to appear in court.