The first time President Barack Obama visited Myanmar, two years ago, the Southeast Asian country's leaders were trying to broker a nationwide cease-fire with ethnic rebel groups amid unprecedented hope that real change was afoot.

As Obama prepares to return for a pair of regional summits this week, Myanmar's leaders are still trying to secure a truce, but prospects for an end to the armed conflicts that have plagued the country for half a century have dimmed. Skirmishes have spread into new areas, more than 120,000 people remain displaced by clashes in the north, and hundreds of thousands of refugees remain abroad, too fearful to return.

It's a far cry from the year that led up to Obama's initial, ground-breaking trip. Back then, a nominally civilian government comprised of retired generals surprised the world by opening the country and spearheading what they vowed would be a transition to democracy. The West applauded the moves by lifting most economic and political sanctions.

"The hope and optimism we had in 2012 is just gone. It's been squandered," said Aung Zaw, a Myanmar journalist based in the Thai city of Chiang Mai who founded the independent Irrawaddy news journal.

The government, he said, "lacks political will to implement more reforms. They've got the West to ease pressure and lift sanctions. They've got foreign investment coming in. They figure they've done enough."

Analysts say the generals outmaneuvered their former foes — in particular opposition leader Aung San Suu Kyi, who was allowed to win a relatively powerless legislative seat but who remains barred from running for president in 2015 because the junta-era constitution contains clauses designed to block her. Ultimate power still rests with the army, and much of the economy remains under the control of active or retired military officers and "crony" businessmen who support them.

So far, the government has been unable to reach durable political agreements with the dizzying array of small rebel armies who have demanded more autonomy for decades. Pursuing such a deal was one of the 11 key commitments announced by President Thein Sein's government when Obama last visited, and it is hugely important. Ethnic minorities make up about 40 percent of the population, and ethnic insurgent groups still control a vast patchwork of private fiefdoms along the country's eastern borders with Thailand and China that are rich in jade, gold, rubies, timber and opium.

Thein Sein's administration has pushed harder to secure a general cease-fire than any other Myanmar government has in decades. It has held repeated talks with opponents and signed truce deals with 14 armed groups, including the Karen National Union, which until 2012 had waged one of the world's longest-running rebellions. Liaison offices have been set up across the country to facilitate the peace process, and rebel officials and civilians have been allowed to move more freely than they have in years.

But deep disagreements remain — over how much autonomy ethnic groups should retain in a federalist system, how to form a national army, and how and when rebels might lay down their weapons, if at all. Hundreds of thousands of ethnic minorities who fled the country because of violence have yet to return. At least 140,000 of them live in refugee camps in neighboring Thailand.

"There have been many reforms in Myanmar, but nothing has changed regarding the ethnic armed organizations," Gen. Sumlut Gun Maw, a leader of the Kachin Independence Army, told The Associated Press. He said that although both sides are negotiating, "fighting keeps breaking out, making it difficult for us to trust each other."

In October, skirmishes erupted in Karen state between the army and the Democratic Karen Benevolent Army, forcing 2,000 villagers from their homes, according to a local advocacy group, Karen Rivers Watch. Activists have also reported an upsurge in fighting in neighboring Shan state between government forces and the Ta'ang National Liberation Army, as well as continued clashes involving units of the rebel Shan State Army.

The most serious fighting has taken place farther north in Kachin state, where more than 120,000 people have been displaced. Human Rights Watch says most people have been unable to return home, their villages abandoned and full of land mines.

In a report last week, the advocacy group Fortify Rights accused the army of shelling and razing civilian homes, attacking displaced camps, opening fire on unarmed villages and carrying out extrajudicial killings.

While the sides accuse each other of starting the violence, Fortify's director, Matthew Smith, said abuses have overwhelmingly been committed by the army, and "the romantic narrative of change is inconsistent with the situation of ongoing war crimes and widespread impunity."

Information Minister Ye Htut, a spokesman for Thein Sein's administration, did not respond to an emailed request for comment.

A truce in Kachin state had held for 17 years before it broke down a few months after Thein Sein assumed the presidency in 2011. Fighting intensified shortly after Obama's 2012 visit, with government forces launching a major offensive around the rebel headquarters in Laiza, on the Chinese border.

Sporadic clashes have continued, and tensions have risen dramatically around the government-held jade-mining town of Hkapant since the army issued an ultimatum to rebels last month to pull back 20 miles (30 kilometers) from the town's perimeter.

David Mathieson, a senior researcher for Human Rights Watch who visited the Kachin region in October, described the situation there as "bleak."

International aid to the area is dwindling, he said, overshadowed by the grim situation of minority Rohingya Muslims in western Rakhine state, where more than 140,000 Rohingya are held in camps they cannot leave and over 100,000 have fled by boat in the face of repeated attacks and persecution in a largely Buddhist nation.

The Rohingya pose little threat to government authority because they have no rebel army and no weaponry. They also are the only ethnic group in Myanmar not officially recognized by the government, which considers them to be migrants who came there illegally from Bangladesh.

Meanwhile, in Kachin state, rebels "are rearming, Burmese (government) troops are moving in, and confidence in the peace process is almost zero," Mathieson said. "The government, which spent decades ignoring the political aspirations of the ethnic people, is slowly realizing it's going to be very difficult. There is a lot of anger on the ground."