A court has granted full maternity leave to a father whose baby was delivered by surrogate.

In South Africa, mothers who give birth are entitled to four months maternity leave, starting one month before their due date. The man, who is unnamed to protect the identity of his child, had a child with his same-sex partner through a surrogate and applied for full maternity leave as the child’s primary carer. His employer initially refused, offering only four days leave, arguing primary carer leave only applied to women.

He reapplied and was offered two months. His employer argued that maternity leave was to allow mothers time off in the last month of pregnancy and to rest after birth, therefore he was only entitled to the two months of time to care for the child. They said all surrogate or adoptive parents were entitled to this, regardless of gender or sexuality.

The judge ruled that the welfare of the child was also key part of parental leave decisions. Since the court-approved surrogacy agreement stated that the man would immediately become the child’s primary carer after birth, he was entitled to the same benefits as birth mothers. The judge ordered the man’s employers to pay him for the two months leave he was not given.

The judge said: “In these circumstances I can see no reason why he is not entitled to maternity leave equal to that of natural mothers. Our law recognises same-sex marriages and regulates the rights of parents who have entered into surrogacy agreements. It is clear the employer’s policy discriminates unfairly.”

It is hoped the ruling will encourage a rethink of parental leave entitlements for adoptive and surrogate parents. South Africa has been one of the leading countries in legal rights for LGBT people, being the first country in Africa and fifth country worldwide to allow same-sex marriage – despite sex between men only being legalised in 1998.

The ruling was welcomed by the new father, who told local newspaper The Mercury: “We have embraced what the new South Africa and democracy has given us. We were able to get married. We were able to have our own child through the legal system. This was the last step that needed to be addressed and now there is a precedent.

“That was the objective of the process. We wanted to make sure that others were treated fairly and equitably. Employees need to know where they stand.

“When this was happening to us, my main concern was for our unborn child. I just didn’t know whether or not I was going to spend a week at home or how long I was going to be allowed to take care of him.

“I felt so disrespected. Something that was so important to me was not getting the attention it deserved. For me this court victory is for others so they don’t have to feel like I did.”