the ministry of the interior (mir) is a department of the government of spain responsible for public security, the protection of the constitutional rights, the command of the law enforcement agencies, national security, immigration affairs, prisons, civil defense and road traffic safety. through the undersecretariat of the interior and its superior body, the directorate-general for internal policy, the ministry is responsible for all actions related to ensuring political pluralism and the proper functioning of electoral processes.