Updated

Cuba denounced the American diplomatic mission on the island on Friday for what it called subversive activities designed to undermine the government of Raul Castro, a shot across the bow just four days before the U.S. election.

The Foreign Ministry said the Americans illegally give classes inside the walls of the U.S. Interests Section, which Washington maintains instead of an embassy, and provide Internet service without permission.

It vowed to defend Cuba's sovereignty "by any legal means" at its disposal, but gave no details. There was no immediate comment from American diplomats on the island.

"The U.S. Interests Section in Cuba continues to serve as a general headquarters for the subversive policies of the North American government," reads the statement, which was published in state-media on Friday.

The statement said the Interests Section's aim was "the impossible task of converting its mercenaries into a credible internal opposition movement."

Cuba considers all opposition figures to be stooges paid by Washington to cause trouble.

The American mission has long provided Internet services to dissidents on the island. It also runs cultural and language programs.

It was not clear why Cuba chose now to criticize the practice. But the timing could be linked to next Tuesday's U.S. election.

Republican candidate Mitt Romney has launched a Spanish-language ad in the key swing state of Florida implying that President Barack Obama is supported by the Castros and leftist Venezuelan leader Hugo Chavez. The Obama administration says the ad itself rewards Chavez and the Castros with undeserved attention, and notes that relations with both countries have remained chilly under Obama.

In its denunciation of the U.S. administration, Cuba charged that those using the diplomatic facilities are indoctrinated into the opposition and trained to work against Cuba's interests.

It said millions of dollars in so-called democracy-building funds went into the effort, evidence, it said, that Washington was still living in the Cold War.

American officials have said previously that they are doing nothing illegal here, and that supporting free speech, cultural activities and Internet access is a common practice at missions around the world.

Cuba and the United States have been at odds since shortly after Fidel Castro's 1959 revolution, which ushered in a Communist government.