This is a situation where this can happen. It is pursuant to the United States Supreme Court case North Carolina v. Alford (1907). In an Alford plea, the defendant does actually plead guilty in criminal court but does not admit guilty and can assert his or her innocence. As part of this plea, the defendant does admit that the evidence that would be presented at trial by the prosecution would be likely to pursue a jury or judge to find the defendant guilty beyond a reasonable doubt.