CARACAS, Venezuela -- The beginning of the end came for the world's tallest slum Tuesday as officials began evicting thousands of squatters from a haphazard community inside the half-built Caracas skyscraper known as the Tower of David.

Police in riot gear and soldiers with Kalashnikov assault rifles stood on side streets as dozens of residents boarded buses for their new government-provided apartments in the town of Cua, 23 miles (37 kilometres) south of Caracas.

Ernesto Villegas, the government minister overseeing Caracas' redevelopment, told reporters the residents could not be allowed to stay indefinitely because the 45-story building in the heart of the capital is unsafe.

He said children have fallen to their deaths from the tower, which in some places is missing walls or windows. The damp, foul-smelling concrete lobby attested to the lack of working plumbing.

Meant to be the crown jewel of a glittering downtown, the building was abandoned amid a 1990s banking crisis. It later was nicknamed the Tower of David, after its financier David Brillembourg.

Villegas said the tower started its life as a symbol of failed capitalism, and later came to represent the power of community. The squatters' invasion was part of a larger appropriation of vacant buildings encouraged by the late President Hugo Chavez.

By 2007, the "invaders," as they're called in Caracas, had claimed everything from the parking garages to the rooftop helipad. They rigged up electricity, opened stores and barbershops, and created a sophisticated internal management system.

On Tuesday, Maria Sevilla, manager of the 28th floor, looked wistfully at the sooty concrete skeleton, with its steep ledges and incomplete stories stippled with satellite dishes.

"What I'll miss the most is the community we built here," she said.

A former street vendor, Sevilla said the 50 neighbours on her floor had become like family to her and her teenage children.

For outsiders, the tower symbolized the height of anarchic dysfunction. The surreal-looking high-rise was widely believed to harbour criminals as well as working families, and it was sometimes raided by police looking for kidnapping victims. The U.S. television show "Homeland" depicted the building as a lawless place where thugs participate in international conspiracies and kill with impunity.

The building's neighbours celebrated the eviction Tuesday. Retiree Antonio Farias looked on with glee, saying the slum had brought the constant threat of kidnapping, rape and robbery.

"It was so beautiful at first," he said.

Inside the tower, the mood was subdued even as dozens of children ran about. Young men talked about families they heard were going to refuse to leave.

Residents complained that they did not want to move so far away. They worry about losing the million-dollar views, and their easy access to supermarkets, public transportation and, possibly, employment.

"I don't know how I'll be able to find a job out there," said Yaritza Casares, 28, leading her 4-year-old daughter through a soaring courtyard. "We were lucky to live here."