“Sí se puede,” President Obama told the Cuban people Tuesday in a nationwide address that promised a new beginning and recalled his 2008 slogan, “Yes, we can.”

“It is time now for us to leave the past behind,” he said, clearly speaking to those watching him on television across the island as much as to the restricted audience inside an ornate colonial-era theater here. “It won’t be easy. . . . It will take time,” but “we can make this journey as friends and as neighbors and as family.”

The speech was like nothing the people of Cuba have heard in many years. Obama issued an emotional appeal for an end to decades of “painful and sometimes violent separation” between those who left for new lives in the United States — who were long officially reviled here as traitors — and those who remained behind. He called on the government to unleash the “full potential” of Cuban ingenuity and youth by opening its doors to free expression and communication.

During the three days Obama was in Cuba, it sometimes seemed as though the isolated island nation had undergone the profound change the president is seeking. He clearly left a deep impression on many Cubans, who saw him appear in a televised comedy sketch, watched him spar publicly with their own president on human rights, and listened to his sweeping address. Many observers said they saw the trip as a turning point. Others, both here and in the United States, questioned whether anything would really change.

For Obama, the carefully choreographed visit epitomized the belief he has articulated since his first day in office: that differences between nations can and should be openly discussed, that historical grievances can be resolved through dialogue, and that his words — and perhaps his charisma — can melt anti-American stereotypes.

But the communist government that has ruled Cuba for decades has withstood other charm offensives and incentives. The question is whether this time will be any different.

Later Tuesday morning, Obama met at the U.S. Embassy here with 13 of the most prominent political dissidents on the island, including José Daniel Ferrer and Elizardo Sánchez, who favor normalization in relations, and Antonio Rodiles and Berta Soler, who have said the United States has reached out to Cuba but received nothing in return.

“In spite of the criticism — and I’ve been one of his critics — it was a very good meeting. Very honest,” said Guillermo Fariñas, winner of the European Union’s Sakharov Prize for human rights.

“We realize that we have differences on tactics but not strategy,” Fariñas said of the session, which he said lasted an hour longer than the scheduled 45 minutes. “He said he admires us, that that’s why he supports us and will continue to do so” even after his presidency, Fariñas said.

Obama’s last event in Cuba was an exhibition baseball game between the Cuban national team and the Tampa Bay Rays. The motorcade to the packed Latin America Stadium provided the clearest indications of how enthusiastic Cubans were about the visit. Thousands lined the route, waving and snapping pictures as Obama’s motorcade passed.

Obama waded into the stadium crowd in sunglasses and a dress shirt, accompanied by his family and Cuban President Raúl Castro. The two leaders sat side by side behind home plate through the first two innings, until it was time for Obama to depart for his next stop, in Argentina.

“What this game is about is goodwill, recognizing that people are people,” Obama said in an interview with ESPN, which broadcast the game. At the same time, he added, “we can’t forget that there are larger stakes involved in this.” He said that among the dissidents he met Tuesday morning were some who had been in jail as recently as Monday, including one who had cuts on the wrists from tight handcuffs.

“There’s a lot of emotion in the stadium, said Samantha Roja, a 25-year-old dentist who attended the game. “The fact that he’s sitting here with the people, in a baseball game, shows that things are going to change.”

As he left, Obama paused to kiss Rachel Robinson, the widow of Jackie Robinson, on the cheek and to chat with former New York Yankees shortstop Derek Jeter, who were among the Americans in attendance. The Rays won, 4-1.

The newly renovated theater where Obama gave his address, a relatively intimate setting ringed with gold-filigreed balconies, was filled with influential Cubans invited by their government, as well as Castro and other senior officials. The Americans issued invitations to members of Congress, business figures and Cuban Americans who came here with Obama.

At times, the audience was a study in contrasts. “I believe citizens should be free to speak their mind without fear,” the president said, as the Americans clapped and the local Cubans sat in stony silence.

Obama began by expressing condolences to victims of the Tuesday morning bombings in Brussels and a pledge to continue the fight against the Islamic State.

Much of the speech, the keynote of his visit, was vintage Obama, quoting the Rev. Martin Luther King Jr. and professing his own faith in human possibility. For this audience, Obama added pointed references to Cuban independence hero José Martí, who he said defined liberty as “the right of every man to be honest, to think and to speak without hypocrisy.”

Cuba, he said, had nothing to fear from the north.

“But having removed the shadow of history from our relationship, I must speak honestly about the things that I believe, the things that we as Americans believe.”

“I believe citizens should be free . . . to organize and to criticize their government and to protest peacefully” without being detained, he said. “And yes, I believe voters should be able to choose their governments in free and open elections.”

“There’s no secret that our governments disagree on many of these issues.” In their conversations, he said with a smile, Castro has “pointed out the flaws in the American system — economic inequality, the death penalty, racial discrimination, wars abroad. That’s just a sample — he has a much longer list.”

“There’s still enormous problems in our society,” Obama said. “But democracy is the way that we solve them. . . . It isn’t always pretty, the process of democracy.”

Castro and his heir apparent, First Vice President Miguel Díaz-Canel, along with other officials, sat stoically through most of the speech and were shown on television applauding politely at Obama’s praise for their country’s health-care system, education and gender equality.

Addressing Castro directly, Obama said he was “confident that you need not fear the different voices of the Cuban people.”

Obama did not mention one of the most prominent irritants in the relationship, at least to Cuba — the continuing U.S. occupation of Guantanamo Bay. In a news conference the two presidents held Monday, Castro said relations would never truly be normal until the United States abandoned Guantanamo and lifted the U.S. trade embargo — which only Congress can do.

Obama called the embargo “an outdated burden on the Cuban people” and on “the Americans who want to work and do business or invest here in Cuba.”

“But even if we lifted the embargo tomorrow,” he said, “Cubans would not realize their potential without continued change here in Cuba.”

Without “free and open exchange of ideas,” he added, “you will not reach your full potential, and over time the youth will lose hope.”

Obama’s remarks were met at home by quick criticism from the Republican National Committee, which called the president’s Cuba trip “little more than another stop on the global apology tour he began shortly after taking office.” By welcoming criticism from Castro, the RNC statement said, Obama showed “an embarrassing display of weakness and lack of moral clarity that have been hallmarks of the failed foreign policy of the last eight years.”

The president drew laughs from both sides when he noted that American democracy was so vibrant that this year’s presidential race featured two Cuban Americans on the Republican side who criticized a president who was “a black man,” and the eventual winner of the GOP primary will face a general-election opponent “who will either be a woman or a democratic socialist.”

“Who would have believed that back in 1959?” Obama said.

Despite his optimistic tone, even the setting of the speech spoke to the ongoing challenge the United States faces when it comes to engaging in a public dialogue in Cuba.

American officials had originally wanted the address to take place in an open-air location, which would have allowed more ordinary citizens to attend.

Obama also used the speech to highlight how his new approach to Cuba has already paid dividends in terms of U.S. partnerships with Latin America, where the breach between the two countries had long been a symbol of U.S. imperialist history. And he highlighted how the United States and Cuba have already worked together on international health crises such as the Ebola outbreak and could expand their cooperation in myriad new directions.

Asked whether U.S. officials had anticipated that the government here would drag peaceful protesters from the Ladies in White organization off the streets Sunday, on the day of Obama’s arrival, deputy national security adviser Ben Rhodes responded in a Monday press briefing, “Unfortunately, yes, because the sad truth is that this has been a pattern for a long time now.” The women, and some of their supporters, were detained for about eight hours and then released, a repeated pattern during their regular Sunday-morning marches.

“We certainly would like to see that cycle broken,” Rhodes added, noting that the two governments now have an ongoing dialogue about the issue.