An Osaka court detained a man for three weeks under the law on human protection after he failed to have his son appear at a hearing in a legal dispute with his wife over the child, sources said.

The man in his 20s who is a resident of Osaka Prefecture was released Thursday after being ordered to hand over their son, 4, to his wife.

The law stipulates that courts can detain those who fail to comply with orders to attend hearings under the law until they do so. The law, however, does not have a clause on a specific period for such detentions.