US President Barack Obama recently singled out Myanmar as a foreign policy victory - a country that had emerged from decades of military rule and turned toward the West, thanks in part to American diplomacy.
If Myanmar succeeds, the president told West Point cadets in May, "We will have gained a new partner without having fired a shot". But two years after Obama made a historic visit to the Southeast Asian nation, the achievement is in jeopardy.
Myanmar's government has cracked down on the media. The parliament is considering laws that could restrict religious freedom. And revered opposition leader Aung San Suu Kyi, who welcomed Obama to her home in 2012, remains constitutionally barred from running for president as the country heads into a pivotal election next year.
The situation is most dire in Myanmar's western reaches, where more than 100,000 Rohingya Muslims are living as virtual prisoners, with little access to health care or food.
The fast-deteriorating conditions prompted Tomas Ojea Quintana, a former UN special rapporteur for human rights, to say in April that there is an "element of genocide" in the Rohingyas' plight.
The setbacks have raised the stakes for Obama's scheduled November visit to a regional conference in Myanmar, during which the administration had hoped to showcase the country's progress as part of its strategic "rebalance" towards Asia. Now, even some of Obama's allies on Capitol Hill have begun to question whether the administration has moved too quickly to embrace Myanmar's leadership.
"We have a moral obligation despite the political benefits" of improving ties, said congressman Joseph Crowley, who has introduced a bill to link additional US aid to human rights reforms.
To be sure, Myanmar is no longer the dictatorship it was five years ago, when it allowed no free elections or public dissent. The government has conditionally released hundreds of political prisoners, abolished censorship and permitted a democratically elected parliament.
The president's spokesman, Ye Htut, said critics were not giving the country enough credit for what it has done.
US officials said Obama would make clear to President Thein Sein that his government must address the rights issues and allow a truly democratic election next year if it expected to maintain good relations.
"As far as Burma's come in the last three years, they're getting to the really hard stuff now," said assistant US secretary of state Tom Malinowski. "That's why there are some acute problems and legitimate fears about prospects for full success."
From 1962 onwards, Myanmar was ruled by secretive, brutal military regimes. The United States imposed stiff economic sanctions after the military killed thousands during a student uprising in 1988.
But by 2010, the Obama administration began to see signs that Myanmar's generals were looking to open up the country and move away from their close ties with China and North Korea. The generals released Suu Kyi - who had won the 1991 Nobel Peace Prize for her pro-democracy struggle - from house arrest.
By 2011, "the prospects for progress were better than at any time in a generation" former secretary of state Hillary Rodham Clinton wrote in her recent memoir Hard Choices, which devotes a chapter to Myanmar.
Clinton went to Myanmar in 2011. The following year, Suu Kyi was elected to parliament, and Obama became the first sitting US president to visit.
Since then, Myanmar has changed rapidly. For decades the country retained the aura of a fading colonial outpost, with crumbling buildings and few Western goods available. Now in Yangon, the country's commercial capital that is also known as Rangoon, construction cranes compete for attention on the skyline with the historic gold Shwedagon Pagoda. Restaurants serving tenderloin and sushi are opening, as are Mercedes and Jaguar dealerships.
The country of more than 55 million people remains one of the poorest in the world. Chinese investment far outpaces that of the United States - about US$14 billion compared with about US$243 million. Western companies have been slow to arrive because of infrastructure problems and a lack of qualified workers.
Despite the political opening, the Myanmese military still holds extraordinary power under a constitution that guarantees the armed forces a quarter of the seats in parliament and reserves key ministry posts for officers.
Myanmese and foreign human-rights activists worry that the government has slowed or even reversed its progress towards democracy.
In his 2012 meeting with Obama, Thein Sein made 11 commitments to implement additional democratic reforms and human rights protections. But activists and US congressional leaders say his government has delivered on few of them.
For example, the Myanmese president pledged to reach a ceasefire in predominantly Christian Kachin state, one of several areas of this majority-Buddhist country where armed ethnic groups have long clashed with the military.
Since a ceasefire in the state fell apart three years ago, the Myanmese military has burned churches and destroyed villages, activists say. The human rights group Fortify Rights recently alleged that the military had tortured more than 60 civilians there in the past three years. The government has denied the torture allegations. Meanwhile, the country's political situation has become complicated by the rise of a movement of extreme Buddhist nationalists, who are freer to operate in the less repressive environment.
Nationalist monks seeking to protect their religion from the spread of Islam are pushing for laws that would block inter-faith marriage and make it more difficult for people to convert. The monks - backed by a petition signed by thousands of citizens - want non-Buddhist men to convert before marrying Buddhist women or face 10 years in prison.
The laws are being drafted in parliament with the support of the government, according to Ye Htut.
Then there is the matter of the Rohingya, a long-persecuted Muslim minority who are not considered citizens, although many have lived in the country for generations. In 2012, thousands of Rohingya were displaced after their villages were torched by Buddhists angry that Muslim men had allegedly raped a Buddhist woman.
Two years later, more than 100,000 Rohingya live in overcrowded camps. Health conditions worsened recently after the government suspended Medecins sans Frontieres and other aid groups following two more rounds of violence, although some humanitarian workers have begun returning.
Ye Htut said that long-running peace talks continued with ethnic militias, including those in Kachin state, and that the government was trying to ease tensions between Rohingya Muslims and Buddhists.
He said Washington should show more appreciation for Myanmar's reforms, which include opening up the government-dominated economy and allowing private newspapers to operate.
"Some people in Congress have tried to shift the goal posts again and again instead of recognising our progress."
Still, the fragility of the reforms has been underlined in recent months as authorities arrested several local reporters on what rights groups call politically motivated charges that include defamation and revealing state secrets. The government has also instituted tighter press registration laws.
"There are a lot of people in Washington who think there is this great success story" in Myanmar, said David Mathieson, senior researcher on the country for Human Rights Watch. "But there are a lot of indicators that they're heading south very quickly."
Obama planned to raise concerns about the Rohingya and the government's unfulfilled promises when he visited Myanmar, a White House official said.
"When we talk about our democratisation agenda in Asia, Myanmar is example number one," the official said, speaking on the condition of anonymity because of diplomatic sensitivities. "It's a big play, but it's a risky play. We know that. And that's why we are continuing to invest in our relationship."
Meanwhile, Suu Kyi's party has launched a petition drive to remove the part of the constitution that gives the military veto power over constitutional changes that could open the door to broader reforms.
On a sweltering day in downtown Yangon, volunteers sat outside the party's headquarters collecting signatures, an activity that would have been unheard of in the days of the military junta.
Music praising Suu Kyi blasted from loudspeakers. Nobody seemed to be afraid of speaking out, but one man wearing a pro-democracy T-shirt asked not to be photographed.
One democracy campaigner, Zin Mar Aung, said she and other activists were harassed with anonymous text messages and death threats after they criticised the proposed interfaith-marriage law. She worries that the petition drive won't work because the military does not want to fully give up power.
"We think their reforms have stagnated," she said. "We think liberalisation is over and the regime doesn't want to give power through democratic elections."