The EU on Monday adopted binding rules extending protection for whistleblowers to ensure they and those close to them are not singled out for retaliation for exposing alleged wrongdoing affecting the public.

The directive, passed by a meeting of EU justice ministers in Luxembourg, enacts a measure the European Parliament overwhelmingly voted for in April. EU member states have two years to transpose the directive into national law.

“No one should risk their reputation or job for exposing illegal behaviours,” said Finnish Justice Minister Anna-Maja Henriksson, whose country currently holds the EU’s rotating presidency.

The rules aim to provide “a high level of protection across the Union to those whistleblowers who have the courage to speak up,” she said in a statement on behalf of EU ministers.

The legislation calls for reporting channels to be set up in EU companies and municipalities and to preferably use them instead of immediately going public.

However, whistleblowers “will not lose their protection if they decide to use external channels in the first place”, the statement said.

Those protected include civil servants, trainees and shareholders and others who might come across breaches through their work. The rules are intended to ensure they will not risk being suspended, demoted or intimidated for speaking out.

The EU ministers noted that, at present, just 10 of the EU’s 28 members have comprehensive laws to protect whistleblowers.

They cited a 2017 EU study that estimated that lack of whistleblower protection when it came to public procurement alone caused a loss of potential benefits for the bloc each year of between 5.8 billion to 9.6 billion euros ($6.4 billion to $10.5 billion).

The EU was put under pressure to introduce the whistleblower law in the wake of the 2014 Luxleaks scandal in which a former PricewaterhouseCoopers employee was convicted in Luxembourg of leaking a trove of documents that revealed tax breaks for multinational firms.

The conviction of employee Antoine Deltour was later dismissed after a public outcry.