YANGON/KUALA LUMPUR (Reuters) - Myanmar said on Monday it had sent out safety instructions to its workers in Malaysia after attackers hacked five of them to death with swords, weeks after it barred workers from going there, partly because of security fears.

Tension between the Southeast Asian neighbors has risen in recent months over the fate of Myanmar’s stateless Rohingya Muslim minority, with Malaysia accusing Myanmar of genocide over its treatment of them.

Myanmar rejects reports of abuses by its security forces against the Rohingyas in the course of a crackdown launched after attackers killed nine Myanmar policemen in border posts near the Bangladesh border on Oct. 9.

On Thursday, four masked men wielding swords attacked Myanmar workers after they had left a factory in the Serdang district on the outskirts of the Malaysian capital, Kuala Lumpur. Five were killed and two wounded.

Malaysian police said seven Myanmar men had been detained shortly after the attack and they did not see any “religious motivations” behind it. They gave no more details.

Mostly Buddhist Myanmar stopped its workers going to Malaysia in December, after Najib Razak, prime minister of the predominantly Muslim country, described Myanmar’s treatment of the Rohingya as “genocide” and called for foreign intervention.

Labor-short Malaysia hosts about 147,000 Myanmar workers, according to Myanmar data.

The spokesman for he Myanmar president’s office, Zaw Htay, said safety instructions had been issued to Myanmar workers in Malaysia and illegal Myanmar workers there were urged to contact the embassy, state media quoted him as saying.

Myanmar was working with Malaysian authorities to investigate the attack and the ban on workers going to Malaysia would remain in force, he said.

Nyunt Win, deputy director general at Myanmar’s Labour, Immigration and Population Ministry, said security worries had been one reason for the ban on workers going to Malaysia.

“There are several reasons for the ban on Myanmar migrant workers going to Malaysia, including security concerns and the fact that they are trying to stir up political troubles against Myanmar,” Nyunt Win said. He did not elaborate.

Last week, Malaysia’s top counter-terrorism official told Reuters in an interview that Myanmar faced a growing danger of attacks by foreign supporters of Islamic State recruited from Southeast Asian networks in support of the Rohingyas.

Malaysian authorities detained a suspected IS follower planning to go to Myanmar to carry out attacks, the head of the Malaysian police counter-terrorism division, Ayob Khan Mydin Pitchay, said, adding that Myanmar targets outside Myanmar were also at risk.