Two death row inmates in Japan are suing the country over how prisoners are notified only hours before the death penalty is carried out, demanding change and seeking compensation for the impact of the "inhumane" practice.

Capital punishment in Japan is conducted by hanging, and the practice of not informing inmates of the timing until shortly before execution has long been decried by international human rights organizations for the stress it places on prisoners, for whom any day could be their last.

In what is believed to be a first, two prisoners sentenced to death filed a suit in a district court in Osaka on Thursday, saying the practice was illegal because it did not allow prisoners time to file an objection, demanding the practice be changed and asking for ¥22 million ($193,594) in compensation.