The Fifth Amendment of the United States Constitution prohibits the government from forcing witnesses to give self-incriminating testimony in criminal cases. Courts may evade this prohibition and force reluctant witnesses to testify by granting them immunity from prosecution. Once witnesses cannot be prosecuted for their testimony, courts may punish them if they refuse to testify.
Federal grants of immunity from prosecution do not bind the states.
See the CRS Annotated Constitution.