Hugo Chávez has sent out troops to take over farms and urged the poor to occupy "unused" land in wealthy areas of Caracas, prompting a wave of squats that is rattling Venezuela's middle class.

The move by Venezuela's president to step up the campaign to "recover" land and other property follows a housing crisis that has left millions of people in shabby conditions and affected his popularity in the run-up to next year's election.

Squatters wearing red T-shirts from Chávez's socialist party seized 20 spaces in a co-ordinated strike in the well-off Caracas municipality of Chacao last weekend, a move which shocked even some government supporters. Additional groups have targeted other cities.

Chávez has also announced a series of laws and deals with China, Russia, Belarus, Iran and Turkey, among others, in a breakneck effort to build 350,000 housing units in Venezuela in the next two years.

"The fundamental goal of socialism is to satisfy human needs … the needs of all, equally, without privilege," Chávez said in a television broadcast yesterday.

Opponents claim the government has failed to build enough houses over the past decade and has been offering "empty promises". Previous house-building deals with foreign allies reportedly produced just 10% of the promised number.

Emilio Grateron, mayor of Chacao, described Chávez's exhortation to seize supposedly unoccupied land as demagogic, and a move that would kill what little private investment remained. "There is irresponsible rhetoric without heed of the consequences. This is a very dangerous game."

The government has stepped up rural expropriations by deploying 1,600 troops at 47 farms in the western states of Merida and Zulia, claiming the farms were unproductive. The state has taken control of 2.5m hectares since Chávez gained power in 1999.

The government is now looking at cities in response to the housing crisis and to its fading support in the slums, once Chávista heartlands, which have voted for opposition mayors and governors.

Floods last year ruined hillside slums and displaced thousands of families, highlighting the shortage of 2m or so housing units. Residents have had to erect shacks on top of shacks on precarious slopes.

Under Chávez the government has built fewer than 40,000 units a year – some say only 24,000 – in contrast to previous governments, which averaged 70,000. The president admits to problems but rejects accusations of incompetence and corruption. He has said that the rich keep all the best land, especially in the capital, but often leave it idle. The government has closed six golf courses and recently had its eye on the Caracas Country Club, saying thousands of poor families could be settled on its greens.

Such a move would take several years, however, and the presidential election calendar requires speedier results. This month Chávez said the government would take over unoccupied spaces and any incomplete structures. Last weekend he urged the poor to join in, and hours later, at 4am, militant supporters laid claim to 20 areas of Chacao. Police expelled them but the "invasions" caused uproar, with even pro-government newspapers such as Ultimas Noticias voicing concern.

Chávez decided the squatters had gone too far, saying "the middle-class cannot be an enemy of this democratic revolution". However, the government made clear the squatting would continue, saying the correct term was "occupation".

Even hotels have become skittish since being asked to host those displaced by the floods. They have obliged, but some proprietors now worry they will be the next industry to be nationalised.

Chacao's five-star Marriott hotel is hosting about 60 displaced families on its third and fourth floors. It has replaced doors with curtains and removed TVs, lamps and other fittings, but Maria Patino, 52, and her sister Blanca, 55, had no complaints. "We're supposed to use the service entrance and not go near the lobby, but we get treated well. Three meals a day, everything free," said Maria. .

"It [was] like being in the desert, and then you get to an oasis."