He spoke by telephone with Mr. Castro before the gathering, and on Thursday, Secretary of State John Kerry met with Bruno Rodríguez, the Cuban foreign minister — the highest-level session between the governments in more than 50 years — to lay the groundwork for the advancing reconciliation. The much-anticipated handshake on Friday night came as leaders gathered for a welcome dinner, where Mr. Obama and Mr. Castro were seated at the same table, separated by two other people.

Before the official start of the summit meeting, Mr. Obama spoke at a civil society forum. “As we move toward the process of normalization, we’ll have our differences government-to-government with Cuba on many issues, just as we differ at times with other nations within the Americas,” he said. “There’s nothing wrong with that, but I’m here to say that when we do speak out, we’re going to do so because the United States of America does believe, and will always stand for, a certain set of universal values.”