The New Jersey State Supreme Court says parents are entitled to get a genetic test when a child's paternity is in doubt.

Chris Ryan, Getty Images

The 5-1 decision made public Wednesday stems from a 2006 divorce case in Morris County.

In that matter, the husband claimed his youngest son was the child of his brother-in-law, who neither admitted nor denied being the father. The husband then sought repayment from him for raising the child.

The wife admitted having an affair with the brother-in-law around the time of conception, and the husband got a privately  commissioned genetic test that ruled him out as the father of the boy, who is now an adult.

Lower courts had ruled that a genetic test by the state would not be in the child's best interests.

(Copyright 2012 by The Associated Press. All Rights Reserved.)