The Criminal Investigation Department (CID) is the branch of a police force to which most plainclothes detectives belong in the United Kingdom and many Commonwealth nations. A force's CID is distinct from its Special Branch (though officers of both are entitled to the rank prefix "Detective").
The Metropolitan Police set up a detective branch with eight plainclothes detectives in 1842, thirteen years after it was established in 1829. Detective units were established in the City of London Police and in other major cities and towns from the mid-nineteenth century onwards. 
On 8 April 1878 C. E. Howard Vincent re-formed the Metropolitan Police Detective Branch into the CID. Originally, Vincent's CID was under the direct command of the Home Secretary, but since 1888 it has reported to the Commissioner of Police.
British colonial police forces all over the world adopted the terminology developed in the UK in the 19th and early 20th centuries, and later the police forces of those countries often retained it after independence. English-language media often use "CID" as a translation to refer to comparable organisations in other countries.
The Direction Centrale de la Police Judiciaire (DCPJ) is the national authority of the criminal division of the French National Police. Its function is to lead and co-ordinate the action of the law enforcement forces against organised crime.
Kriminalpolizei is the standard term for the criminal investigation agency within the police forces of Germany, Austria, and the German-speaking cantons of Switzerland.
The Hong Kong Police Force's CID is a sub-branch unit within the Criminal Intelligence Bureau under the crime wing of the B department (crime and security).
Many state police forces in India possess a CID (sometimes known as the investigation branch) as a specialised wing. Personnel attached to this wing work in plain clothes, or mufti. A CID may contain sub-branches, for instance the CID in Uttar Pradesh includes the state crime investigation bureau, finger print bureau and scientific section.
Like their counterparts in the law and order police, the crime branch has its own ranks up to the level of additional director general of police or special commissioner of police. The crime branch has senior officers like superintendents, inspectors and sub-inspectors. Officers and men attached to this wing generally add the prefix detective before their regular police rank.
The crime branch's tasks are to investigate criminal cases, which span across multiple districts or states. The CID may also take up complicated cases like communal riot cases, circulation of counterfeit currency or very complicated murder cases. A crime branch investigation is ordered either by a judicial court, by the director-general of police, or the government.
Crime branch officers can be transferred to the law and order police, and vice versa. The crime branch is different from the crime detachment or crime squad. Crime Detachment and Crime Squads are a group of regular law and order policemen (who generally wear the uniform specifically detailed by the police inspector to work in plain clothes to keep a tab on local criminal elements, prostitutes, petty thieves, and other habitual offenders.
The criminal investigation units within the Indonesian National Police are called sat-reskrim (satuan reserse kriminal) meaning "criminal investigation unit", it is under the bareskrim (badan reserse kriminal) "criminal investigation agency" which is under the command of the national police headquarters. Every regional police force in Indonesia has this unit; they are concerned with conducting criminal investigations and identification activities.
The Royal Irish Constabulary (RIC) maintained a CID along British lines before the independence of most of Ireland in December 1922. After the Partition of Ireland and the establishment of the Irish Free State in the early 1920s, the Government of the Irish Free State set up a CID for the purposes of counter-insurgency during the 1922-1923 Irish Civil War. It was separate from the unarmed Civic Guard, which later became the Garda Síochána. The Garda today operates local detective squads and several specialised, national detective units, including the National Bureau of Criminal Investigation.
In Northern Ireland, a region that came into existence in 1921 and which has remained within the United Kingdom, a new police force was formed in June 1922 called the Royal Ulster Constabulary (RUC). This force had its own CID from the start. In November 2001, the RUC was replaced by the Police Service of Northern Ireland (PSNI).
Criminal investigation departments or bureaus are set up within each Prefectural police headquarters. They maintain two investigation divisions (, sousa-ka) (third or even fourth divisions are established in some urban prefecture), a organised crime investigation division (?, soshikihanzai-taisaku-ka) (reinforced as an independent department or headquarters in the TMPD and some prefecture), a mobile investigation unit, and a identification division (, kanshiki-ka). The mobile investigation units (, kid? sousa-tai) are first responders for initial criminal investigations, distributed among the region with unmarked cars. The special investigation teams (?, tokushu-jiken sousa-kakari) are specialised detective units of the first investigation divisions, well acquainted with new technologies and special tactics including SWAT capabilities.
The CID of the Royal Malaysian Police is involved with the investigation, arrest, and prosecution of crimes that affect people (e.g. murder, robbery with firearms, rape and injury) and property crime (e.g. theft and house-breaking). Modeled on the British police, this department enforces laws regarding gambling, "sin" and the Triad in Malaysia.
The CID in Pakistan is a special unit of the provincial and metropolitan police departments, responsible for carrying out investigations into crimes, including terrorism, murders, organised crime and sectarianism. The special branch of the CID in the Asia Division (CIDA) was a division of this department but is currently not operational. It had only 12 members, the names of which are not available because of security issues.
Detectives are usually either assigned to a CID unit within a local policing command, or to a central specialised unit dealing with a specific type of crime, such as fraud or sexual offences. Most local police stations have more uniformed officers than CID officers; a smaller station might have five DCs with a Detective Sergeant (DS) in command, while a larger station would have more CID officers under a detective of higher rank. A particular case would be assigned to a Senior Investigating Officer (SIO) whose rank would depend on the seriousness of the crime and their force's policy.
Detectives in the United Kingdom do not have a separate rank system and are not senior to uniformed officers who hold the same rank. Before 1999, female detectives' ranks were prefixed with "Woman", as in other branches of the police. The head of the CID in most police forces is a Detective Chief Superintendent. Ranks are abbreviated as follows:
To join a CID in the United Kingdom, a police officer usually must have served in uniform for at least two years. From 2017 direct entry to the detective branch became possible. While training as a detective they are referred to as a Trainee Detective Constable (TDC) and after completing the national Initial Crime Investigators' Development Programme, typically taking around two years, they become full Detective Constables (DCs).
There is generally no pay increment on obtaining detective status in most forces. Previously paid allowances such as the detective duty allowance (a small payment intended to allow officers to purchase refreshments and other similar petty cash purposes) and the plainclothes allowance (an allowance used to purchase suitable clothing) have all been withdrawn over the past few years.
The Royal Military Police (RMP), Royal Navy Police (RNP), and RAF Police all maintain a Special Investigation Branch (SIB), fulfilling much the same role as a civilian CID. The Ministry of Defence Police is a civilian force that provides policing services on military bases, and as such has a CID much like a territorial police force. The RMP SIB has regular sections and one Army Reserve section. To join the reserve section, a reservist must either have a regular army SIB or civilian CID background.