Zahir Belounis, the French footballer trapped in Qatar without pay due to the country's sponsorship system for migrant workers, has been granted an exit visa after a two-year struggle and is scheduled to leave the state this week.

Human-rights organisations welcomed the move but said they would continue to campaign for the exit visa system to be abolished amid reports of widespread mistreatment of migrant workers building the wherewithal for the 2022 World Cup.

In a message tweeted by his brother Mahdi, Belounis said: "I thank people for everything. If I am out, it is because of your fantastic commitment and support for human rights."

His brother confirmed that an exit visa has been granted and that he expects Zahir to return to Charles de Gaulle airport in Paris with his wife and two young children on a flight that will take off on Thursday.

The French ambassador to Qatar, Jean-Christophe Peaucelle, also confirmed that following "intensive work" with the Qatari authorities Belounis has been issued with an exit visa and will be able to return home.

Belounis had been in dispute with his former club, El-Jaish, for more than two years over unpaid wages. But even after agreeing to give up his claim to the money, he had not been allowed to leave the country under the kafala sponsorship system that ties migrant workers to their employers.

In a desperate plea to the Qatar 2022 ambassadors Pep Guardiola and Zinedine Zidane, highlighted by the Guardian this month, Belounis said he had been "living a nightmare" for the past two years. "This is great news for Zahir and his family, but there are still huge numbers of men and women still trapped in Qatar on account of its exit visa system," said Nicholas McGeehan of Human Rights Watch.

"Their rights are no less important than Zahir's and their mistreatment is no less shameful. Hopefully this outbreak of common sense is a precursor to Qatar abolishing the exit visa system altogether and getting serious on labour reform."

The decision to allow Zahir to leave came as the global players' union FifPro was due to arrive in the country with representatives from the International Trade Union Confederation (ITUC) for four days of talks. "As the worldwide representative for professional footballers, FifPro will be able to welcome back a long-lost family member," it said following news that Belounis had secured an exit visa.

The organisation had said it was "seriously concerned" by allegations of human-rights violations in the construction of World Cup stadiums and related infrastructure.

These have become a major issue for Fifa and the World Cup organisers since in-depth reports by human-rights organisations and an investigation by the Guardian into the plight of Nepalese migrant workers highlighted the scale of the problem. The ITUC has claimed that 4,000 workers could die before a ball is kicked unless there is serious reform of the system to hold subcontractors to new laws, and kafala is abolished.

"A grave injustice is nearly over for Zahir and his family. One man and his family have come to illustrate the conditions faced by 1.3 million migrant workers in Qatar," said Sharan Burrow, the ITUC general secretary. "The torment that Zahir and his family have been put through because of bad laws which give workers no rights should never be repeated."

Fifa's president, Sepp Blatter, has said "fair working conditions" must be introduced quickly in Qatar. Blatter, said it would host an "amazing World Cup" and was "on the right track" with regard to workers' rights. But a week later he met the ITUC and others in Zurich and Fifa put out a statement in which it said the situation was "unacceptable" and insisted "fair working conditions with a lasting effect must be introduced quickly in Qatar".

This week, on a trip to Kuala Lumpur, he appeared to blame the European media for "attacking" Qatar over the issue and claimed the focus on workers' rights was "not fair". The Qatar Football Association has denied Belounis's claims, saying that it had helped him recover unpaid wages when he played for another club in the country, but that he had never lodged a complaint about al-Jaish.