YANGON, Myanmar (AP) — Two Myanmar photojournalists who were arrested in Bangladesh last month while covering the massive influx of Rohingya Muslims from their country have been allowed to leave Bangladesh, their lawyer said Tuesday.

Jyotirmoy Barua, said they were released on bail and allowed to leave the country.

Award-winning photographer Minzayar Oo and his assistant, Hkun Lat, were detained Sept. 7 and charged with visa violations and espionage in Cox's Bazar court.

"The charges are not dropped yet but hopefully they will be dropped soon and they won't need to come back to Bangladesh for a trial," Jyotirmoy said.

Authorities said they violated immigration rules by entering Bangladesh on tourist visas while working as journalists. They were released on bail on Sept. 23 but had not been allowed to leave the country.

"I am so very happy to be able to leave Bangladesh and to return to my country," Minzayar Oo said by telephone on his way home at Bangkok's airport. "I also want to thank friends from Myanmar and Bangladesh and international organizations who helped in any way they could for our release."

Minzayar Oo and Hkun Lat were both on assignment for the German magazine GEO to cover the Rohingya exodus to Bangladesh.

The United Nations says 582,000 Rohingya Muslims have fled from violence in Buddhist-majority Myanmar to Bangladesh since Aug. 25.