The United Arab Emirates has passed a law requiring mothers to breastfeed their children until they are two years old. The clause was added to a children's rights law, but the social affairs minister, Mariam al-Roumi, said it raised the prospect of husbands suing wives who did not breastfeed.

"This part of the law can be a burden," Roumi was quoted as saying by the Emirati newspaper the National. "If the law forced women to breastfeed, this could lead to new court cases."

The Dubai-based group Out of the Blues, which supports mothers with postnatal illness, warned that the law could criminalise women when they are at their most vulnerable. "We are concerned that enacting a law that leaves mothers facing potential punishment could be a step too far," the group said.

Members of the UAE's federal national council, which passed the law, suggested wet nurses should be provided for children whose mothers had died or could not feed them.

"This is the right of every child for two years," Sultan al-Sammahi said. "If they do not have a mother or have been neglected, then they should get this right from someone else."

Another member, Ahmad al-Shamsi, said the law aimed to make breastfeeding "a duty and not an option" for able mothers. "This is part of raising a child. This is mandatory," he said. "Laws are not all about fines and penalties – some are also humane."

The law says all government offices must provide a nursery so working mothers can breastfeed, an existing regulation that has never been enforced.