Myanmar began releasing hundreds of prisoners Thursday under a mass amnesty that comes just days before a landmark visit by US President Barack Obama to the formerly military-ruled nation.

Relatives of the scores of political detainees still languishing in jails were waiting anxiously to learn whether they would be among those freed. The government declined to reveal how many dissidents were pardoned.

A prison department official said 452 prisoners would walk free on Thursday.

"There are some foreigners included in the amnesty," he added, speaking on condition of anonymity, without giving details of their nationalities. The release was also announced in state media.

Myanmar, formerly known as Burma, has already freed hundreds of political prisoners incarcerated by the former junta, as part of reforms that have led to a dramatic thaw in relations between the one-time pariah nation and the West.

Obama will on Monday become the first sitting US president to visit Myanmar, where he will meet former general President Thein Sein and opposition leader Aung San Suu Kyi.

Suu Kyi, a Nobel Peace Prize winner, was herself released by the regime in 2010 after years under house arrest.

A spokesman for Suu Kyi's National League for Democracy (NLD) welcomed the latest amnesty but questioned its timing.

"It is strange that they released prisoners just before Obama's visit," Ohn Kyaing told AFP.

"They should have done it before and showed their genuine will to give the amnesty," he said, adding that it was unclear if any NLD members were among those being freed.

Other prominent pro-democracy figures called for an immediate release of all prisoners of conscience.

Kyaw Min Yu, a leader of 88 Generation which takes its name from a student uprising brutally put down by the army in 1988, called a full amnesty "critical to national reconciliation" after five decades of military rule.

"The release of prisoners should not be related to Obama's trip. It's just something the government should do as quickly as possible," he added.

The last major amnesty in September saw dozens of dissidents freed just before a historic visit to the United Nations in New York by Thein Sein. But it left many political prisoners behind bars.

Estimates of their number vary but the Assistance Association for Political Prisoners, a Thailand-based campaign group, put the current figure at 283 in a list posted on its website on October 31.

As recently as about a year ago, rights groups accused Myanmar of wrongfully imprisoning about 2,000 political opponents, dissidents and journalists.

The visit by Obama -- fresh from his re-election victory -- has been lauded by Myanmar as a sign of confidence in the reforms introduced under a nominally civilian government, which replaced the junta in March 2011.

It also comes as deadly communal violence between Buddhists and Muslims in the country's impoverished west casts a shadow over the political changes.

Clashes in Rakhine state have claimed 180 lives since June and forced more than 110,000 people, mainly Rohingya Muslims, into makeshift camps.