In an extraordinary news conference Monday afternoon, President Obama and Cuban President Raúl Castro sparred over human rights, the Guantanamo prison and their views of their own countries and the world, even as both hailed Obama’s historic visit here as a new step in normalizing relations.

The event was marked by a jarring juxtaposition of diplomatic formality and public jousting, as Castro responded to questions from American reporters by either ignoring them or dismissing them as misguided. At one point, he challenged a U.S. journalist to “give me a name” of any alleged political prisoner here.

For his part, Obama seemed to relish the opportunity to display his comfort in discussing both the things they agreed on, and those they did not. The public exchange was virtually unprecedented in Cuba.

[Raúl Castro, the Cuban leader behind Obama’s historic visit]

Appearing together after a closed-door meeting on the first full day of Obama’s visit to Cuba — the first by a sitting U.S. president since 1928 — the two leaders began with magnanimous statements about the dramatic improvement in relations. Their work together “benefits not only Cuba and the United States, but the entire hemisphere,” Castro said.

Obama responded that “it’s fair to say the U.S. and Cubans are now engaged in more areas than at any time in my lifetime.” Quoting Castro’s words, he acknowledged that “the road ahead will not be easy. Fortunately, we don’t have to swim with sharks to achieve the goals that you and I have set forth.”

But their differences were clear. Obama said he had spoken “frankly” to Castro about human rights, free expression and democracy in their two-hour meeting. “Our starting point is that we have two very different systems . . . and decades of profound differences.” While the United States would continue to speak its mind, he said, it would not seek to impose its system on Cuba.

Castro called on the United States to abandon the territory it occupies with a military base at Guantanamo Bay, on Cuba’s southwestern tip, and to remove the U.S. embargo against Cuba. He said relations would never be fully normal until both were accomplished.

[Obama’s visit comes as American businesses are rushing back to Cuba]

“We recognize the position President Obama is in, and the position his government holds against the blockade” — as Cuba calls the embargo — “and that they have repeatedly appealed to Congress to have it lifted,” he said.

In the past 15 months, Obama has moved quickly to solidify the U.S. opening to Cuba, with the Treasury and Commerce departments publishing five rounds of regulatory changes easing restrictions on travel and finance. In July, diplomatic relations severed in 1961 were reestablished and embassies opened in Washington and Havana. But the administration has said it has no intention of leaving the U.S. base at Guantanamo Bay or relinquishing the territory, which it holds under a 1903 lease that can be canceled only by the agreement of both parties.

Castro said the two countries have “profound differences that will not disappear overnight . . . such as our political system, democracy, the exercise of human rights, social justice, international relations, and world peace and stability.”

1 of 54 Full Screen Autoplay Close Skip Ad × What President Obama is doing on his historic visit to Cuba View Photos He is the first sitting U.S. president in the country in nearly 90 years. Here’s a look at what Obama is doing and what Cuba looked like before he arrived. Caption He is the first sitting U.S. president to visit the country in nearly 90 years. Here’s a look at what Obama is doing and what Cuba looked like before he arrived. March 22, 2016 Cuban President Raúl Castro, right, receives President Obama at the Gran Teatro, where Obama would deliver a speech, in Havana. Yuri Cortez/AFP/Getty Images Buy Photo Wait 1 second to continue.

In what appeared to be an angry response to a question about political prisoners here, posed by CNN correspondent Jim Acosta, whose father emigrated from Cuba, Castro said: “If there are political prisoners, give me a list, right now. What political prisoners?”

“Give me a name or names, and if there are political prisoners, they will be free by tonight,” he added.

While human rights activists say several dozen people are serving long prison sentences here for alleged political offenses, Cuba maintains that those said to be political prisoners have been convicted of common crimes.

The issue of whether the Cubans would allow questions at the Castro-Obama appearancewas left open until the last minute. Castro told reporters he had agreed that Obama could take two questions, and he would take one.

[The last time a president visited Cuba was 1928. It was big back then, too.]

The exchanges highlighted Obama’s experience in dealing with a critical media, and Castro’s clear discomfort and frustration over the practice of U.S. reporters of asking multiple questions at a time. After Obama finished a lengthy response to queries directed to both leaders, he turned to Castro, who had taken off his interpretation earphones.

Obama winked at the audience and gestured to the Cuban leader. “Sounded like a question to you?” Obama said. He reminded Castro that he had been asked whether he would vote for Hillary Clinton or Donald Trump. “I cannot vote in the United States,” Castro responded abruptly.

Speaking later of human rights in Cuba, Castro asked “what country complies with” all international agreements on the subject. Like others, he said, Cuba had signed some but not others.

But Cuba, he said, complied with “the most sacred” rights, the ones guaranteeing universal health care and education.

In a clear dig at the United States, he also cited those countries that “believe that for equal work, a man makes more than a woman simply because she’s a woman.” He added, “In Cuba, women get the same pay for the same work.”

[Here’s why Obama didn’t meet Fidel Castro in Cuba]

Obama began his opening statement by saying that “for more than half a century, the sight of an American president in Havana would have been unimaginable. But this is a new day. Un nuevo dia.”

During the question portion of the event, Obama said he was confident that “the embargo’s going to end. When, I can’t be entirely sure. But I believe it will end, and the path that we’re on will continue beyond my administration.”

Both presidents spoke of progress they have made with new travel, agricultural and business agreements, as well as partnerships on health, education and the environment. Later in the afternoon, Obama addressed a gathering of U.S. business leaders and Cuban entrepreneurs. A state dinner hosted by Castro was the last event on Monday’s schedule.

As the day began, the Cubans rolled out full military honors for Obama in an official arrival ceremony, a display perhaps warranted by Castro’s long history as minister of defense from the 1959 revolution until he took over the presidency from his brother, Fidel Castro, in 2008.

Obama stopped first at the Plaza of the Revolution, where he laid a wreath at the massive statue of 19th-century Cuban independence hero José Martí, whose likeness gazes pensively at the place where Fidel Castro for years delivered stem-winding speeches denouncing U.S. imperialism.

[Obama’s goal: ‘Support’ for Cubans seeking new paths]

Immediately after the wreath-laying, Obama was mobbed by Cuban and U.S. television reporters standing in the plaza. He smiled and winked and began walking, through a stiff breeze under cloudy tropical skies, to the nearby palace.

There, he first signed a guest book, writing that “It was a great honor to pay tribute to José Martí, who gave his life for the independence of his homeland. His passion for liberty, freedom and self-determination lives on in the Cuban people today.”

In the central hall of the palace, he was greeted by Castro, and the two smiled and shook hands warmly before reviewing a military honor guard. It is was the fourth meeting between the leaders, who first shook hands at the 2013 funeral of Nelson Mandela in South Africa. Following their December 2014 announcement that relations would be reestablished, they held a meeting last April at the Summit of the Americans, and again at the United Nations in September.

[Watch: Obama’s Cuban agenda]

Nick Miroff in Havana contributed to this report.

Read more:

Cuban Americans are split on the value of Obama’s trip to Havana

Obama tries comedy to woo Cuban people

The Cuba Obama will see is changing, but much remains the same

Today’s coverage from Post correspondents around the world