President Obama, left, and Malaysian Prime Minister Najib Razak during their joint press conference in Putrajaya, Malaysia, April 26, 2014. (Ahmad Yusni/EPA)

President Obama celebrated America’s closer ties with the Muslim-majority nation of Malaysia Sunday, even as he suggested “there’s more work to be done” here on the issue of human rights.

Obama’s visit — the first by a U.S. president since 1966 — offered Malaysia Prime Minister Najib Razak a chance to show off how much the nation has advanced since President Lyndon B. Johnson stopped here decades earlier. He noted during a joint news conference that at that time The Monkees topped the charts in the United States and “The Sound of Music” was winning Oscars.

“Today, Mr. President, you see not rubber trees, as Lyndon B. Johnson did, but soaring skyscrapers. They are a testament to the transformation that is taking place here in Malaysia," Najib said. “We are a modern, progressive Muslim majority nation, a multiethnic, multi-religious society.”

But even as the two leaders touted deeper cooperation on issues ranging from nuclear nonproliferation to trade — Najib described the two countries’ relationship as “closer now than ever before” — they were pressed to explain how they reconciled Malaysia’s rapid modernization with the repression of political dissent and freedom of expression. Activists complain that Najib’s government has used the nation’s anti-sodomy and sedition laws to sideline its political opponents.

“There’s a recognition by the Malaysian government that more work needs to be done,” Obama told reporters, adding he shared with Najib that democratic protections such as “the respect for freedom of assembly, the respect for people of different races and different faiths and different political philosophies — that those values are at the core of who the U.S. is, but also I think are a pretty good gauge of whether a society is going to be successful in the 21st century or not.”

Obama even used the example of alleged racist remarks by L.A. Clippers owner Donald Sterling as a lesson in the importance of racial and ethnic tolerance for Malaysians as well as Americans. “Like Malaysia, we constantly have to be on guard against racial attitudes that divide us, and instead embrace our diversity as a strength,” he said.

Nearly two-thirds of Malaysia’s citizens are ethnic Malays, while about 30 percent are Chinese and another 7 to 10 percent are Indian. Tensions between the country’s different ethnic and religious groups have increased recently for several reasons, including the fact that a 1996 fatwa forbidding the practice of Shia Islam is being invoked more often and a Malaysian appeals court ruling in October that a Roman Catholic Church newspaper could not use the Arabic word “Allah” to refer to God because that phrase was reserved for Muslims.

Ambiga Sreenevasan, one of 10 electoral reform and human rights advocates who met with the president for an hour on Sunday night, wrote in an e-mail that the ruling government has used “divisive politics” to stay in power.

 “The attacks against the Chinese, the Christian community (in the Allah issue), the constant racist attacks against the minority communities is rising by the day,” she wrote, adding she was encouraged by Obama’s engagement on the issue.

In a separate event Sunday, during a town hall with young leaders from 10 ASEAN countries, Obama spoke more explicitly about discrimination against minorities as he replied to an online question from a Burmese youth. The president noted that some Muslims in Burma have experienced discrimination, adding, “Here in Malaysia, this is a majority Muslim country. But then, there are times where those who are non-Muslims find themselves perhaps being disadvantaged or experiencing hostility.” 

Najib, for his part, defended his regime’s human rights record while echoing Obama’s remarks that “there’s more work to be done.”

“President Obama and I are both equally concerned about civil liberties as a principle,” he said, adding that he had eliminated detention without trial since taking office in 2009. His task, he said, was to undertake these sort of reforms, but “society has got to be prepared for it, for change, because what is important is the end result. And the end result, as the prime minister, of this country, I’m committed to ensure peace, stability and harmony.

President Obama is in Asia for a four-country tour to promote commerce and trade as part of his administration's so-called "Asia pivot." But with rising tensions in the region, what does his relationship with Japan, South Korea and China look like? (Julie Percha/The Washington Post)

The two leaders also made the case for striking a broad trade deal, the Trans-Pacific Partnership (TPP) initiative, while they acknowledged they faced some domestic opposition to the idea. Demonstrators stood outside the University of Malaya where Obama was speaking Sunday afternoon with signs saying “No TPPA.”

“Trade deals are always complex, but our countries are committed to resolving the remaining issues,” Najib said, adding “there will be losers in the process. . . . But overall, the benefit, I think — it’s important for us to show to the people in Malaysia that the benefits far outweigh the disadvantages of a free-trade agreement.”

The president noted that he also faced political resistance to the trade deal, which involves 12 nations. “Keep in mind, I’ve got protests from my own party on TPP,” he said.

And while the president’s tour of Kuala Lumpur included the kind of cultural and technological stops he made in Japan and South Korea — Obama visited the National Mosque of Malaysia and the Malaysian Global Innovation and Creativity Center — he couched his visit in more personal terms because he lived in Indonesia for part of his childhood.

Obama emphasized his connections to Southeast Asia throughout his trip. At Saturday’s state dinner, hosted by King Abdul Halim Muadzam Shah at the Istana Negara palace, the president spoke of his mother’s love of batik and uttered a few phrases in the local language.

He prompted shouts of appreciation during the town hall event from a delegation of Indonesians when he mentioned he had lived in their home country. And the president suggested that he would continue to promote closer ties between the United States and Asia, because it is “part of the connection I felt, and still feel, to this region.”