Facts

The appellant ([A.] , represented by counsel) was sentenced on 18 August 2011 by the Zofingen District Court, among other things for bodily harm, theft, handling stolen goods, coercion, and weapons and narcotics offences, to a custodial sentence of 3 ½ years; the conditional enforcement of a fine was revoked. The custodial sentences were fully served on 10 August 2013.

From 11 August 2013, the appellant was in security detention. On 14 November 2013, the Zofingen District Court imposed a stationary therapeutic measure under Art. 59 SCC (treatment within the meaning of Art. 65 para. 1 SCC in conjunction with Art. 56 and Art. 59 SCC). On 12 May 2014, he entered the Königsfelden Psychiatric Clinic, absconded on 1 May 2015, and was arrested again on 29 August 2015.

On 3 September 2015, the Office for Penal Enforcement refused conditional release upon expiry of the regular maximum duration. On 7 September 2015, the Zofingen-Kulm Public Prosecutor's Office applied for an extension of the measure by five years under Art. 59 para. 4 SCC, as well as a provisional extension; the presiding judge did not enter into the application for a provisional extension on 9 September 2015.

On 28 January 2016, the District Court extended the stationary measure for a maximum of five years and credited the 232 days of deprivation of liberty under the measure against it under Art. 51 SCC. The appellant challenged the decision on 15 February 2016 before the Cantonal Court of Aargau and requested, among other things, immediate release from detention as well as suspensive effect. The Public Prosecutor's Office also lodged an appeal.

On 8 April 2016, the Cantonal Court granted the appellant's appeal, set aside the decision of 28 January 2016, and remitted the matter to the District Court (operative paragraph 1). It dismissed the Public Prosecutor's Office's appeal as moot (paragraph 2). It did not enter into the application for release from detention (paragraph 3), on the grounds that an appeal under Art. 387 CrimPC generally has no suspensive effect, the appellant was in the enforcement of a measure, and case management lay with the first-instance court after the decision became final. The application for official legal assistance was likewise dismissed (paragraph 4).

By way of a criminal law appeal, the appellant requested before the Federal Supreme Court that operative paragraph 3 be set aside and that he be released immediately, or alternatively that the matter be remitted; he also applied for free legal aid and legal representation. The Cantonal Court waived a response and stated that on 20 May 2016, in another proceeding, it had ordered security detention until 14 July 2016. The Public Prosecutor's Office requested non-entry or, alternatively, dismissal, as the legal interest in protection had lapsed. The appellant maintained his legal interest in protection in his reply.

Considerations

The subject matter of the proceedings is solely operative paragraph 3 (non-entry on the application for release from detention). Operative paragraph 1 (remittal) is not contested, so complaints relating to it are not to be examined. The criminal law appeal under Art. 78 ff. FSCA is admissible; the appellant has standing under Art. 81 para. 1 FSCA and may allege a violation of federal law (Art. 95 let. a FSCA).

Under Art. 5 para. 4 ECHR, every person arrested or detained has the right to have a court decide speedily on the lawfulness of the deprivation of liberty. Under Art. 222 CrimPC, the detained person may challenge decisions ordering, extending, and lifting pre-trial or security detention before the appellate authority. The application for immediate release from detention, filed in the appeal proceedings against the extension of the measure, was therefore admissible, and the Cantonal Court was entitled and obliged to decide it.

The fact that the Cantonal Court did not decide…