US President Barack Obama promoted freedom of expression during a forum with young people in Ho Chi Minh City on Wednesday.
"You've got to let people express themselves," he told a female rapper who asked whether governments should play a role in promoting arts.
"That's part of what a modern 21st-Century culture is all about."
The comments were among his most direct, and personal, on the subject of human rights during his three-day visit to Vietnam.
"Governments sometimes get nervous about art," Obama said. "But if you try to suppress the arts, then I think you're suppressing the deepest dreams and aspirations of a people."
Around 800 people attended Wednesday's event, most from the Young Southeast Asian Leaders Initiative (YSEALI), a US programme launched by Obama in 2013 on leadership exchanges for 18-to-35-year-olds.
On Tuesday, several prominent Vietnamese dissidents who had been invited to meet with Obama in Hanoi were detained by Vietnamese authorities and held until after the US president had departed for Ho Chi Minh City.
Some of them had previously spoken out on controversial subjects in the communist country, including human rights and democracy.
The "town hall" format was unusual in Vietnam, where members of the public rarely have direct access to government leaders.
Many of the questions were flattering. “You’re a great leader," one Vietnamese student started. "What is your advice for young leaders so we can be a great leader like you?”
Another young man stood up and said, "I want to say that you're so handsome."
Laughter rippled throughout the ballroom and Obama replied, "You can just stop there if you want."
The man proceeded to ask a question about entrepreneurship.
Obama encouraged young Vietnamese to be engaged in society and to pursue their passions.
"Find something that you care deeply about, find something that excites you and put all your energy and effort into it," Obama said. "The path for everybody is different."
"I didn't start off thinking I wanted to be president of the US,” he said.
“I was more interested in basketball and girls. I wasn't that serious. You're already way ahead of me."
Obama covered a range of topics in the forum, including the Trans-Pacific Partnership (TPP), a 12-nation trade deal signed in February that he said would boost Vietnam economically while providing new labour protections and environmental benefits.
The president also discussed the importance of fighting climate change.
"If a country like Vietnam, or China, or India take the same development path the US did, we're all going to be under water," Obama said.
"The United States, we have to do more," he conceded, "but everybody has to do something."
Climate change "could have a huge impact on Vietnam's ability to feed its people, on fishermen, on farmers, and it could be a really big problem if we don't do something about it," Obama said.
He offered praise for the Association of South-East Asian Nations, saying, "When small countries band together as a unit their powers magnify."
Obama, who spent time living in Indonesia as a child, touted his ties to the region, saying it “helped to shape me.”
"One of my favourite parts of the trips I take overseas is to get out of the government offices and to spend time with young people like you," Obama said. "It gives me incredible optimism about the future."
After the forum, Obama left for Japan to participate in the G7 Summit and to visit Hiroshima, where he was set to become the first US president to appear at the site of the 1945 atomic bomb attack.
Obama was the third US president to visit Vietnam, following Bill Clinton in 2000 and George W Bush in 2006.
Diplomatic relations between the two countries were normalized under Clinton in 1995, two decades after the end of the US-Vietnam War.