MOSCOW  A crowd of more than 10,000 young Moldovans materialized seemingly out of nowhere on Tuesday to protest against Moldova’s Communist leadership, ransacking government buildings and clashing with the police.

The sea of young people reflected the deep generation gap that has developed in Moldova, and the protesters used their generation’s tools, gathering the crowd by enlisting text-messaging, Facebook and Twitter, the social messaging network.

The protesters created their own searchable tag on Twitter, rallying Moldovans to join and propelling events in this small former Soviet state onto a Twitter list of newly popular topics, so people around the world could keep track.

By Tuesday night, the seat of government had been badly battered and scores of people had been injured. But riot police had regained control of the president’s offices and Parliament Wednesday.