Bangladesh's coast guard said it rescued Wednesday at least 382 "starving" Rohingya refugees floating in a large boat in the country's territorial waters after nearly two months at sea.

Acting on a tip-off, the coast guard patrol launched a three-day search for the boat, locating it at night off the country's southeastern coast, spokesman Lieutenant Shah Zia Rahman said.

"We have rescued at least 382 Rohingya from a big overcrowded fishing trawler and brought them to a beach near (the coastal town of) Teknaf. They were starving," Lt Rahman told AFP, adding that more than 30 had died on board.

"They were floating for 58 days. And over the last seven days it was moving in our territorial waters," he said.

The Rohingya, who were thought to be from refugee camps on Bangladesh's southeast coast, were headed to Malaysia, but turned back at sea when that country implemented a strict coastal patrol due to the coronavirus pandemic, the Dhaka Tribune local newspaper said.

Lt Rahman said authorities would investigate the possibility that the refugees could also have come from the Rohingya homeland in Myanmar's restive Rakhine state, where they are a persecuted Muslim minority.

Those rescued reported that "32 Rohingya died aboard the overcrowded trawler and their bodies were thrown in the sea," the official said, adding that an investigation into the matter was underway.

"We have cordoned off the place where they have landed. We could not question them because of the fear they could be infected with the coronavirus," he said.

Footage posted on Facebook by a local journalist showed mostly women and children, emaciated and standing on the beach.

A local government administrator told AFP that officials were still counting the rescued but that he feared the number could exceed 400.

READ MORE Top UN court orders Myanmar to prevent Rohingya genocide

The Dhaka Tribune said the ship was packed with nearly 500 Rohingya.

Nearly one million Rohingya live in squalid camps near Bangladesh’s border with Myanmar, many fleeing the neighbouring country after a brutal military crackdown began in 2017.

With few opportunities for jobs and education in the camps, thousands have attempted to reach other countries like Malaysia and Thailand.

Since late last year, Bangladesh's law enforcement agencies have picked up some 1,000 Rohingya from coastal villages and boats as they waited to board vessels bound for Malaysia.