BEIJING (AP) — A Chinese farmer who murdered a local official with a modified nail gun after his house was torn down was executed Tuesday, in a case that had prompted a rare debate about government abuse of power.

Jia Jinglong was put to death in the northern city of Shijiazhuang after a final visit with family members, the official Xinhua News Agency said. That followed the high court's rejection of his final appeal last month.

The February 2015 murder had garnered sympathy among some Chinese angry with haughty officialdom, and two state-run newspapers published calls for Jia to be spared. The China Daily editorialized that "Jia would probably not have acted as he did if his loss had been properly taken care of."

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 and, bitter and depressed, he began plotting the killing of the leading Communist Party official in his village, He Jianhua. On Feb. 19 last year, Jia approached the 55-year-old at an official gathering and shot him in the back of the head with a single nail.

He's killing was "cruel in the extreme and the effect on society was extremely negative," Xinhua quoted the Supreme People's Court saying in its ruling issued last month.

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.

Local governments are heavily reliant on land sales for revenue, resulting in the frequent use of strong-arm tactics in housing demolitions. Officials sometimes collude with real estate developers to pocket generous kickbacks for themselves, giving them more incentive to force residents from their homes.