DES MOINES, Iowa (AP) — The Iowa Supreme Court said Friday that a brother and sister who inherited a large share of their stepfather's estate when he died in 2012 must pay inheritance taxes in a case that challenged the way Iowa's tax laws treat stepchildren.

A Republican-led legislature in 2003 changed the state's inheritance law so that children who inherit money from a stepparent after the parents divorced could no longer qualify for a longstanding inheritance tax exemption for natural or adopted children.

Paula Tyler and Mark Alcorn sued the Iowa Department of Revenue claiming the state law violates the Iowa Constitution's guarantee of equal protection.

Tyler and Alcorn were raised by Donald Hitzhusen and their mother, Connie Smith Hitzhusen, from a young age. He helped pay for their college education and they remained close even after he and their mother were divorced in 2001. They cared for him in his final years until his death at age 79. He left them 77 percent of his $1.9 million estate.

Tyler and Alcorn were assessed a $200,000 inheritance tax bill. They were told by the state that because their mother had divorced Hitzhusen prior to his death, they were no longer eligible for the exemption available to other stepchildren, adopted children or biological children. They argued the Iowa Legislature had no valid reason in 2003 to treat one group of stepchildren differently from others.

"It could be characterized as a penalty or punishment of stepchildren for the divorce of their parents, said David Dutton, an attorney who represented Tyler and Alcorn in the case.

A relationship between children and a stepparent is not severed by death or divorce but often continues as it did in the case of Tyler and Alcorn, he argued.

The state, however said lawmakers were justified in excluding stepchildren in a divorce from the inheritance tax exemption as way to promote close family relationships.

The court, in an opinion written by Justice Edward Mansfield, found that promoting family relationships and close connections among relatives are legitimate state goals to consider in taxing schemes.

"When a divorce occurs, the parent and the stepparent no longer form a single family unit. Thus, favorable tax treatment of transfers from stepparent to stepchild is no longer needed to promote or protect that family," he wrote in the court's ruling.

He also pointed out that the family could have avoided the inheritance tax if Hitzhusen had adopted Tyler and Alcorn before his death.

While most states have abolished inheritance taxes, Iowa, Kentucky, Maryland, Nebraska, New Jersey and Pennsylvania continue to collect them.