A resident looks outside from the window of his apartment at the 45-story slum in Caracas.

Photo: Fernando Llano, Associated Press

A resident looks outside from the window of his apartment at the...

Image 2 of 4

Broken windows are seen covered with wood planks at the building known as "Tower of David."

Photo: Fernando Llano, Associated Press

Broken windows are seen covered with wood planks at the building...

Image 3 of 4

A woman carries her belongings after being evicted as she walks in front a mural of the late Venezuelan President Hugo Chavez, at the world's tallest slum, the Tower of David, a half-built skyscraper that was abandoned in the 1990s and was transformed by squatters into a vertical ghetto, in Caracas, Venezuela, Tuesday, July 22, 2014. Officials and armed soldiers began moving out the first of thousands of squatters who have lived for nearly a decade in a soaring, half-built skyscraper in the heart of Caracas. (AP Photo/Fernando Llano)

Photo: Fernando Llano, Associated Press

A woman carries her belongings after being evicted as she walks in...

Image 4 of 4

A resident waits for transportation to a new home after being evicted from the world's tallest slum, the Tower of David, a half-built skyscraper that was abandoned in the 1990s and was transformed by squatters into a vertical ghetto, in Caracas, Venezuela, Tuesday, July 22, 2014. Officials and armed soldiers began moving out the first of thousands of squatters who have lived for nearly a decade in a soaring, half-built skyscraper in the heart of Caracas. (AP Photo/Fernando Llano)

The first of thousands of squatters who transformed a half-built skyscraper into a vertical slum were moved out by armed police and soldiers Tuesday, marking the beginning of the end for the Tower of David's haphazard community.

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 Cua, a town about 23 miles south of Caracas.

Ernesto Villegas, the government minister overseeing Caracas' redevelopment, told reporters that the eviction was necessary 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.

Villegas said the tower, initially a symbol of failed capitalism, had gone on to represent community. The squatters' invasion was part of a larger appropriation of vacant buildings encouraged by the late former President Hugo Chavez.

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.

By 2007, squatters had claimed everything from the parking garages to the rooftop helipad. They rigged up electricity, opened up stores and barbershops, and created an 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 neighbors on her floor had become like family to her and her teenage children.

For many, the tower was a symbol of anarchic dysfunction. It was depicted in the U.S. television show "Homeland" as a lawless place where thugs participate in international conspiracies and kill with impunity.