A Chinese farmer who killed a local official with a modified nail gun after his house was torn down has been executed.

The official Xinhua News Agency says Jia Jinglong was put to death Tuesday morning in the northern city of Shijiazhuang after a final visit with family members.

The February 2015 murder had garnered sympathy among some Chinese angry with haughty officialdom, and two state-run newspapers published articles calling for Jia to be spared. Jia had opposed his home's 2013 demolition to make way for a new development and felt he wasn't adequately compensated. His planned marriage was then called off.

Land seizures and government corruption are major sources of discontent in China, where the legal system remains weak and ordinary citizens have few channels to seek redress.