A diversion program, also known as a pretrial diversion program or pretrial intervention program, in the criminal justice system is a form of pretrial sentencing in which a criminal offender joins a rehabilitation program to help remedy the behavior leading to the original arrest, allow the offender to avoid conviction and, in some jurisdictions, avoid a criminal record. The programs are often run by a police department, court, a district attorney's office, or outside agency. Problem-solving courts typically include a diversion component as part of their program. The purposes of diversion are generally thought to include relief to the courts, police department and probation office, better outcomes compared to direct involvement of the court system, and an opportunity for the offender to avoid prosecution by completing various requirements for the program. These requirements may include: