de Polícia" (General Police Intendancy), which merged police units with investigative functions, call currently of Civil Police. He also created a Military Guard with police functions on 13 May 1809. This is considered a predecessor force of local military police units. Later, in 1831, when independence had already been declared, each province started organizing its local "military police", with order maintenance tasks. On 31 January 1842, law 261 was enacted, reorganizing the investigative offices, the current "civil police". The first federal police force, the Federal Railroad Police, was created in 1852. Finally, in 1871, law 2033 separated police and judicial functions, creating the general bureaucratic structure and mechanisms still adopted nowadays by local police forces. In 1944, a federal police institution was created. The current Federal Police department was conceived on November 16, 1964. During the military dictatorship, some political police organizations were maintained, such as the DOI-CODI. Primary functions Law enforcement and maintaining order are the two primary functions of Brazilian police units. In Brazilian Law, maintaining order is considered a preventive effort whereby police troopers patrol the streets to protect citizens and discourage criminal activity. Law enforcement consists of criminal investigation after an offence. Prevention and investigation in Brazil are divided between two distinct police organizations. State "military police" forces only have order maintenance duties. Correspondingly, "civil police" institutions are responsible solely for crime investigation. However, at the federal level, the Federal Police is commissioned with both preventive and investigative functions of federal crimes. Federal institutions There are four federal police institutions in Brazil: the Federal Police, the Federal Highway Police, the Federal Railway Police, and the Federal Penal Police. The Federal Police, officially the Departamento de Polícia Federal investigates of crimes against the Federal Government or its organs and companies, combats international drug trafficking and terrorism, and conducts immigration and border control (including airport and seaport policing). It is directly subordinated to the Ministry of Justice and Public Security (Brazil). The Federal Highway Police has the main function of patrolling federal highways. It maintains order, but does not investigate crime. The Federal Railway Police, is the third and last component of the federal police force. Its main function is patrolling the federal railway system. It does not investigate crime, solely focusing on order maintenance. As of 2022, the agency is not functional. The Federal Penal Police was created by the Federal Constitutional Amendment number 104 (in effect