PINAR DEL RIO, Cuba — Pedro Pablo Oliva was the kind of model citizen the Cuban government wanted to show the world.
Mr. Oliva proclaimed his loyalty to Fidel Castro's revolution and his gratitude for cultural largesse that nurtured his development into an internationally celebrated painter and sculptor. He even did a turn as a delegate in the regional assembly of the western province of Pinar del Rio.
However, when Mr. Oliva criticized harassment of dissidents and suggested there might be room for a party other than the Communists, he was abruptly expelled from the assembly and accused of counterrevolutionary behavior. He found himself with no choice but to shutter his home-based community workshop after the government withdrew its support.
President Raul Castro has called on Cubans to air their opinions openly, as his government tries to revive the struggling economy with economic reforms. However officials have sent mixed signals about where it draws the invisible frontier between loyal criticism and what they consider to be dangerous attacks on the system.
A prominent socialist intellectual who made a sharp attack on corruption at high levels found himself booted out of the Communist Party for months. In another case, officials just seemed to shrug when two state economists criticized the country's economic reforms as insufficient.
While Mr. Oliva was punished for denouncing attacks on dissidents, famous singers Pablo Milanes and Silvio Rodriguez escaped official reprisals after making similar comments.
"It's a very difficult question to know where the line is because the line depends on the moment," said Arturo Lopez Levy, a Cuban-born economist who lectures at the University of Denver.
The line has moved a long way since the early moments of the revolution, when a government inspired by Soviet communism sent thousands to grueling farm work camps for religious belief, long hair, "anti-social" opinions or homosexuality.
Mr. Milanes and Roman Catholic Cardinal Jaime Ortega were confined in those camps as young men. Mr. Rodriguez was removed from the airwaves at the same time for saying he liked the Beatles and for hanging out with people the government considered suspicious.
Things have changed enough that Mr. Milanes and Mr. Rodriguez were later given seats in Cuba's national parliament, and Cardinal Ortega sometimes has meetings with Raul Castro, whose own daughter is the island's leading voice for gay rights.
The country has even emptied its prisons of internationally recognized "prisoners of conscience," but political opposition can still mean frequent trips to a police station, allegations of treason, confrontations with government supporters or loss of a state job in a communist state where the government controls most jobs and all the news media.
Mr. Oliva's troubles began after his now ex-wife, also an artist, was prevented from putting up a series of public installations critical of the government on International Human Rights Day in December.
In what is known on the island as an "act of repudiation," a crowd of government supporters gathered outside Yamilia Perez Estrella's home, yelling insults and preventing her from leaving.
The government insisted the demonstrations were spontaneous outpourings of patriotic indignation, though coordination with state security agents took place in plain sight.
In response, Mr. Oliva published a letter on the website of dissident blogger Yoani Sanchez, criticizing physical or psychological "violence" aimed at silencing unpopular opinions. He said his dealings with Ms. Sanchez, whom he met when she visited his workshop, marked him, as did his calls for political diversity on an island where the Communist Party is the only one allowed.
"The very act of saying I think there should be other parties in the country — that's where the line was totally crossed, was ruptured," Mr. Oliva said in an interview at his home studio.
Mr. Milanes has often tested the limits of what officials will swallow. In a 2008 interview with the Spanish newspaper, Publico, he suggested that Raul Castro is too old to run Cuba.
"I don't trust in any Cuban official who is more than 75 years old," he said.
Earlier this year, he told journalists in Florida that a dissident group has a right to protest.
"The most vile and cowardly thing is for a horde of supposed revolutionaries to ruthlessly attack [them]," Mr. Milanes wrote. This "does not mean I disagree with Fidel (Castro)," he added.
A column on state-run website, Cubadebate, chided Mr. Milanes for what it called his erratic opinions and speculated he was suffering a deep personal crisis. But officials have not moved to stop the international star from giving concert tours around the world.
Mr. Milanes, who has written odes to the comminist rebel Che Guevara, still clearly considers himself a socialist.
"My 53 years of revolutionary militancy give me the right, which very few exercise in Cuba, to express myself with the freedom that my principles require," he said.
Cuban media may have given a hint of one line not to cross when the newspaper, Trabajadores, published an interview with Mr. Rodriguez in which he urged a more democratic socialism, eased restrictions on travel, better environmental protection and less discrimination.
The complete transcript later posted on Mr. Rodriguez's blog showed Trabajadores had cut some of his more controversial sentiments, such as: "I hope if someone protests for something that we don't agree with, we have enough dignity to respect their right to express themselves."
Cuba has a deeply ingrained "fortress-under-siege" hostility to speech that might give ammunition to the enemy dating back to the struggle to break free from Spain in the 1890s, Mr. Lopez said.
That bunker mentality sharpened after the 1959 Cuban Revolution and the start of U.S. efforts to oust Fidel and Raul Castro. Officials often say the need to present a united front justifies the prohibition of a free local media on the island.
"Prevention of expressing certain views is not only tolerated but, I would say, supported by the general population" in a way that seems unfamiliar to Americans who cherish their First Amendment rights, Mr. Lopez said.
"I can't think of a time in the United States when somebody came to me and said: 'You know what, this is true but he shouldn't have said it.' It's very unusual."
Fidel Castro expressed the principle in a 1961 warning to Cuba's intellectual class that excessive criticism would not be tolerated.
"Within the revolution, everything; outside the revolution, nothing," he said.
During "the five gray years" from 1971 to 1976, officials took a narrow view of "within the revolution." Some artists and academics were fired from their jobs and hounded into exile. Free-thinking poet Heberto Padilla was denounced, arrested and forced to make a public apology for his thoughts, even after winning a major local literary award.
Since taking over the presidency, Raul Castro repeatedly has invited Cubans to debate his economic reforms and said people will not be punished for their opinions. The government says millions had their say during town-hall style meetings held across the island.