The UN Human Rights Committee recalled that, in order to avoid a characterization of arbitrariness, detention should not continue beyond the period for which the State Party can provide appropriate justification. Furthermore, judicial review of the lawfulness of detention under article 9, paragraph 4, of the International Covenant on Civil and Political Rights (ICCPR) is not limited to mere compliance of the detention with domestic law but must include the possibility to order release if the detention is incompatible with the requirements of the Covenant, in particular those of article 9, paragraph 1.
Source: official link