New Zealand on Wednesday passed a legislation granting victims of domestic violence 10 days paid leave to allow them to leave their partners, find new homes and protect themselves and their children.

New Zealand is the second country to pass such a law after Philippines which passed a similar law in 2004, reported Huffington Post.

The bill was passed with 63 votes to 57 in the New Zealand Parliament. Green Party MP Jan Logie, who first proposed the bill and has been campaigning for it for more than seven years, said it would help victims “stop the violence and get help without worrying about losing their jobs”.

“Part of this initiative is getting a whole-of-society response,” Logie said, according to The Guardian. “It is about changing the cultural norms and saying ‘we all have a stake in this and it is not OK’,” she said.

The new legislation will come into effect in April 2019 and says that a person experiencing domestic violence will be entitled to 10 days paid leave from work, in addition to standard holidays and sick leave entitlements.

The legislation also makes discrimination against domestic abuse victims illegal. The National Party, the Opposition party in the country, objected to the law on these grounds, saying it could affect victim’s job prospects.

National Party spokesperson Mark Mitchell said employers would “start to filter” applicants, considering whether they wanted that risk in their workplace. “Jan Logie’s Bill is not going to prevent or stop one domestic violence attack against a woman,” he said, according to Huffington Post.

New Zealand has one of the highest rates of domestic violence in the developed world, with police responding to a family violence incident every four minutes.