An arrested person has some rights which are established in the Spanish Procedural Penal Law (in Spanish Ley de Enjuiciamiento Criminal, henceforth LECrim). These rights are essential to comply with the fundamental right to a process with all the guarantees recognized in the article 24 of the Spanish Constitution (henceforth CE). But before let see how a person can achieved this status, what are the motives under which a person can be arrested.
A person can be arrested if any of the causes of the article 490 or 492 LECrim apply to him. The former is aimed to any citizen, it states that any person can arrest other under the circumstances enumerated in the article, and the more important, it is a possibility not an obligation. The latter, is only applicable to police officers, and is not a possibility, it is an obligation that the policeman must comply.
Once a person is arrested, he has to be brought to the Instructor Judge, for this the LECrim establishes a deadline. Although the article 416 has a maximum period of 24h. to put a person at judicial disposition, this article has been implicitly derogated by the article 17.2 CE and the article 520.1 LECrim, in both of them has been established a new maximum period, 72h. In other words, a person can be detained by the police a maximum period of 72h. without being putted at judicial disposition. Nonetheless, this is an absolute maximum which cannot be in any case surpassed, the law established another relative maximum, a person can be only arrested the precise time to make the investigations necessaries to the clarification of his guiltiness. Therefore, the 72h. will only apply when the arrested cannot be released before because the investigation has not been finished. If the maximum period for the detention is surpassed, it will be considered an infringement of the article 520 of the Spanish Penal Law (in Spanish Código Penal, henceforth CP).
Now we know the motives, and how many time can a person be detained without being putted at judicial disposition, it is time talk about his rights. A person detained by the police has to be informed of his rights at the moment of his detention, if not the functionary who makes the detention will be responsible of an infringement of the article 537 of the CP. Achieved this point, I have to repeat what I have said at the introduction, the rights included in the article 520 LECrim are a development of the right to a process with all the guarantees recognized in the article 24 of the CE. From this right to a process with all the guarantees derives the right to be informed of the causes of the detention, notwithstanding this right of information is expressly recognized also in the article 24.2 of the CE. This right to the information has been developed by the article 520 LECrim, since due to this article the arrested person should not only be informed with the causes of his detention, but also he has to be informed with the rest of the rights which compound his right to a process with all the guarantees, as the right to be assisted by a lawyer or the right to remain in silence during the interrogation.
One of these rights which has to be putted into the knowledge of the arrested, is his right to know at least the essential causes of his detention. This is really important, because assures to the arrested person the possibility to impugn his detention. We have to part from the idea that the judge could have declared the secret of the summary (art. 302 LECrim), so even when this has occurred the arrested person will have the right to access to the necessary information. The moment to access to this information by the arrested person will never surpass the audience of the article 505 LECrim, because it will be the moment when the arrested person will have the opportunity to exercise his right to contest his detention.