The Supreme Court on Thursday ruled in favor of a U.S.-based father seeking to return his 13-year-old son brought by the mother to Japan, overturning a lower court ruling against the father's request.

The top court made the first decision on cases in which the return of a child has yet to take place despite a finalized Japanese court order to take the child back based on the 1980 Hague Convention on the Civil Aspects of International Child Abduction.

The Supreme Court's First Petty Branch said it sees "clear illegality" in the mother's failure to comply with the order and sent the case back to the Nagoya High Court's Kanazawa branch for further deliberation with a hearing from the child.

The top court ruled that it is illegal that a parent does not comply with a court order to return a child that is made based on the Hague treaty unless the circumstances are exceptional.

The boy was born and raised in the United States, while his parents are both Japanese. A cross-border child custody battle began after the mother left their residence in the United States and returned to Japan with their son in 2016.

Last November, the high court branch rejected the father's plea to take the son back to the United States, the boy's former habitual residence, saying the custody transfer was against his will.

The Hague treaty sets out rules and procedures for the prompt return to the country of habitual residence of children under 16 taken or retained by one parent as a result of failed marriages, if requested by the other parent.

The pact stipulates that if a parent takes a child to another member state, a judgment as to which one of the parents is to take care for the child should be made in principle after returning the child to the country of his or her former habitual residence. Japan joined the convention in 2014.

Based on the treaty, the Tokyo Family Court ordered the mother to return the son to the United States and it was finalized in November 2016. But when enforcement officers visited the home of the mother and the child in Japan, the mother refused to let him go.

The situation prompted the father to file a habeas corpus appeal with the Nagoya High Court's Kanazawa branch, but it rejected his claim, saying, "Custody transfer is against the son's will and the Hague Convention does not influence judgment on a habeas corpus petition."

Filing a habeas corpus petition is the process to restore liberty of a person unlawfully deprived of it under Japan's Habeas Corpus Act. If a court judges a case as the illegal detention of a person, the court orders the detainer to release the person.

In cases of a child custody battle, a parent who refuses to bring his or her child to the court is subject to imprisonment or fines.

A parent can file the petition with either regional or high court and if she or he is dissatisfied with the court's judgment, an appeal to the Supreme Court is possible.

As of the end of February, there were six cases in which the return of a child has yet to take place despite a court order to take the child back based on the Hague Convention, according to the Japanese Foreign Ministry.

At the top court, the mother has argued the son wishes to stay in Japan and lawyers representing the son have submitted a similar written statement.