YANGON, Myanmar (AP) — In a historic breakthrough, President Barack Obama on Monday stepped onto the soil of long-shunned Myanmar and into the flag-waving embrace of its once repressed people. "You gave us hope," he declared, the first U.S. president to visit what not long ago had been an international outcast.

Tens of thousands of people poured into the streets to welcome Obama to a place still learning its basic freedoms.

Speaking to a national audience from the University of Yangon, Obama offered a "hand of friendship" and a lasting U.S. commitment, yet a warning as well. He said the new civilian government must nurture democracy or watch it, and U.S. support, disappear.

The visit to Myanmar was the centerpiece of a four-day trip to Southeast Asia that began in Bangkok and will end Tuesday in Cambodia, where Obama will attend an East Asia Summit.

Obama seemed to revel in the history of what he was witnessing in Myanmar — a nation shedding years of military rule, and a relationship between two nations changing fast.

"This remarkable journey has just begun," he said.

In a notable detour from U.S. government policy, the president referred to the nation as Myanmar, the preferred name of the former military regime and the new government, rather than Burma, the old name and the one favored by democracy advocates and the United States government.

On his first trip abroad since his re-election earlier this month, Obama got a warm welcome in Myanmar, hugging long-time opposition leader Aung San Suu Kyi and lauding her as a personal inspiration. Crowds swelled at every intersection, yelling affectionately for Obama and his secretary of state, Hillary Rodham Clinton.

"You are the legend hero of our world," one banner read.

Obama acknowledged Myanmar's many democratic shortcomings but said: "The United States of America is with you."

Obama spoke at a university that was once the center of government opposition, and his message was as much a call for Myanmar to continue in its promising steps as it was a tribute to democracy in general. He held up the United States as an example of its triumph and its imperfections.

Story continues

Coinciding with the president's visit, the government of Myanmar announced further human rights steps to review prisoner cases and de-escalate conflicts in ethnic regions of the country.

But Obama urged even more, calling for a government where, as he put it, "those in power must accept constraints."

"The flickers of progress that we have seen must not be extinguished," Obama said in an address televised to the nation.

Obama paid a personal call to the revered democracy advocate, Suu Kyi, at the lakeside 2-acre compound where she spent much of the last two decades under house arrest. The house, a colonial-style, grey stucco home, has become synonymous with the movement that brought about democratization reforms.

Suu Kyi echoed Obama's tone with an admonition of her own, one that could have been directed at her own ruling party as much as to the United States:

"The most difficult time in any transition is when we think that success is in sight," she said. "Then we have to be very careful that we're not lured by the mirage of success."

Earlier, with President Thein Sein at his side, Obama said the journey was just starting. "But," Obama said, "we think a process of democratic and economic reform here in Myanmar that has been begun by the president is one that can lead to incredible development opportunities."

In a first-ever scene, Air Force One flew over Myanmar's lush countryside, which was dotted with gold-spired temples, rice patties and fish farms. As the plane approached Yangon, the landscape became more crowded with homes, including many clusters of shacks.

Obama walked down the steps of his aircraft with Clinton, a shared image done in recognition of their last trip together. Clinton plans to leave the diplomatic post soon.

In an extraordinary scene for Myanmar, huge crowds of people lined the streets of Yangon to watch Obama's motorcade pass, including hundreds of students wearing matching school uniforms of white shirts and dark green sarongs. Many held up iPads and smart phones to take photos of the speeding motorcade.

Obama has rewarded Myanmar's rapid adoption of democratic reforms by lifting some economic penalties. The president has appointed a permanent ambassador to the country, and pledged greater investment if Myanmar continues to progress following a half-century of military rule.

The trip to Myanmar came against a backdrop of criticism from human rights groups that say Myanmar's government, which continues to hold hundreds of political prisoners and is struggling to contain ethnic violence, hasn't done enough to earn a personal visit from Obama.

The president's response: Progress this dramatic deserves a global spotlight.

"When I took office as president, I sent a message to those governments who ruled by fear: We will extend a hand if you are willing to unclench your first," Obama said. "... So today, I have come to keep my promise, and extend the hand of friendship."

___

Associated Press writer Julie Pace contributed to this report.