BEIJING (Reuters) - Police in the Chinese capital on Tuesday blocked off streets near a major military building, as hundreds of people wearing green camouflage uniforms chanted and waved national flags to protest against the loss of their posts.

China last year announced it would cut troop levels by 300,000, targeting the bulk of the reductions by the end of 2017, as it seeks to spend more money on high-tech weapons for its navy and air force.

Tens of thousands of protests take place in China every year, triggered by grievances over corruption, pollution, illegal land grabs and other factors, unnerving the stability-obsessed ruling Communist Party.

On Tuesday, buses stretched down a block of Chang'an Avenue, Beijing's main thoroughfare, with police blocking the gaps between vehicles to obstruct views of the tightly-packed demonstrators.

The voices of the protesters in front of the military's Bayi Building rose above the traffic as they chanted songs, while some waved Chinese flags and banners protesting against their treatment after losing their positions in the military.

"Our rights and benefits to be transferred from military posts to suitable civilian work have been violated," read the inscription on one banner.

Police denied Reuters access to the demonstration site, while China's defense ministry did not immediately respond to emailed questions.

Armed police vehicles also patrolled the area, and individuals who appeared to be plainclothes police carried walkie-talkies and headsets.

China's defense minister, Chang Wanquan, is to host a banquet at the Bayi Building on Tuesday evening for participants of the Xiangshan Forum, which Beijing styles as its answer to the annual Shangri-La Dialogue security forum in Singapore.

China has the world's largest military and the government of President Xi Jinping is pumping billions of dollars into a modernization program, including aircraft carriers, anti-satellite missiles and stealth jets.

Protests by demobilized soldiers are not uncommon, and previously some who had fought against Vietnam in 1979 have demonstrated in complaint against problems over their pensions.

Many people try to use "petitions" to bypass the legal system and bring complaints directly to the attention of government officials, a process that dates back to imperial times, though some cases do end up in court.

Few cases ever get resolved, however, and petitioners can stage noisy protests out of frustration.

(Reporting by Natalie Thomas, Thomas Peter and Paul Carsten; Additional reporting by Ben Blanchard and Beijing Newsroom; Editing by Clarence Fernandez)