A man who tried to rob a pizza delivery driver in Des Moines was sentenced to 27 years in prison Monday. The botched robbery sparked a debate over the rights of gun owners.

Twenty-year-old Kenneth Jimmerson was sentenced to prison for second-degree robbery, intimidation with a dangerous weapon and other charges. He could be eligible for parole in seven years. In March, police said Jimmerson held a gun to the head of James Spiers as Spiers entered an apartment building to deliver a pizza.

Spiers grabbed the weapon, pulled out his own gun and fired. Jimmerson was hit twice by the gunfire as he fled and was later arrested after checking himself into a hospital. Spiers had a valid permit to carry a concealed weapon but was fired from his job at Pizza Hut.

The company said Spiers violated a no weapons policy. State Senator Brad Zaun, a Republican from Urbandale, called on Iowans to boycott Pizza Hut. The case also prompted someone to launch a website in Spiers’ honor.