BEIJING — He presented himself as a candidate of the people, a folksy problem-solver who would rid garbage-strewn streets of dog waste and put an end to illegal parking.

But in the eyes of the authorities, Zhang Shangen, 73, a candidate in local elections in Beijing on Tuesday, was a menace seeking to undermine the Communist Party.

The Chinese government blocked Mr. Zhang’s campaign at every turn, sending police officers to intimidate him and his supporters. On the eve of a major rally last month, Mr. Zhang said, the authorities whisked him to a city more than 800 miles away.

“The government manipulates everything,” he said in an interview at his home in Beijing on Tuesday. “They are scared people will wake up to reality.”