Cuban asylum seekers stole a bus and used it to smash through the gates of the Mexican embassy in Havana.
A dozen of them later stood on the roof of the building shouting anti-Castro slogans and threatening to jump if police tried to arrest them.
Several hundred Cubans had gathered outside the compound in the morning after rumours that the Mexican authorities would grant them visas.
Embassy officials made it clear that the rumours were false, but the tension grew as more people gathered. A bus with about 20 people on board was then rammed through the gates of the embassy.
Police stopped crowds who tried to follow the bus. Several people, including two journalists, were attacked by police officers wielding batons.
Cuban human rights groups said there had been what they called "many acts of police brutality".They urged the Mexican authorities to accept the protesters' appeal for asylum.
One dissident leader, Mr Elizardo Sanchez, said: "If they are handed over to the Cuba authorities, they could face severe sentences."
The Cuban government called the protesters "anti-social delinquents" and said they had been urged on by mercenaries in the service of the US. Cuba has laid the blame firmly at the door of Radio Marti, operated from Miami by anti-Castro Cuban-Americans.