A man who fired a gun at George Zimmerman's truck during a road rage confrontation last year was sentenced to 20 years in prison Monday.

The lengthy sentence angered social media pundits as many cast the judgment as unfair, comparing it to Zimmerman's own acquittal after he fatally shot unarmed black teen Trayvon Martin in 2012.

In both cases, the shooters claimed self-defense, but for Matthew Apperson, the 38-year-old who shot at Zimmerman, it didn't help.

SEE ALSO: Man Says George Zimmerman Stalked Him After Threatening to Kill Him

Apperson told police that Zimmerman had pointed a gun at him first during the road rage incident, and Zimmerman told the court that was a lie. Prosecutors argued Apperson showed no regard for human life by shooting at Zimmerman in May 2015 and a jury found him guilty of second-degree attempted murder, armed aggravated assault and shooting into a vehicle last month. The judge sentenced Apperson Monday to the state-mandated minimum for such a crime, 20 years.

George Zimmerman kills a kid and walks. The guy who shot him is doing 20 years. How is this justice? — Karim Walker (@shift_in2_turbo) October 17, 2016

George Zimmerman kills an unarmed teenager #TrayvonMartin and still walks free today. Guy shoots a gun at him, misses, 20 yrs. Madness. — Cory Thompson (@c0ryt) October 17, 2016

Man who shot at George Zimmerman gets 20 years, but Zimmerman walks free after KILLING an unarmed black kid. Insane. — Wolf Hudson (@WolfHudsonIsBad) October 17, 2016

George Zimmerman killed someone and got off. Someone shot at George Zimmerman and got 20 yrs. That’s exactly what BLM is talking about, man — Joel D. Anderson (@byjoelanderson) October 17, 2016

George Zimmerman killed a child and walked but the guy who shot at George gets 20 years. But yeah,believe in the system. — Shay Stewart Bouley (@blackgirlinmain) October 17, 2016

Man who shot at George Zimmerman has been sentanced to 20 years. Meanwhile Zimmerman is free after killing an innocent young boy. Disgusting — Hannah Kavy (@hannahhairflip) October 17, 2016

Zimmerman had minor injuries from glass and metal fragments after Apperson's bullet shattered the window of his truck.

Zimmerman told the court that Apperson was dangerous. "The crux here is Mr. Apperson's blatant disregard for my life, any life ... anybody driving up and down Lake Mary Boulevard," he told the judge, according to the Orlando Sentinel.

Zimmerman's acquittal in 2013 sparked protests across the country after he successfully used Florida's "Stand Your Ground" law to defend himself once charged with second-degree murder and manslaughter.