beat the rap

beat the rap (to avoid punishment for an error or crime; to escape being punished for a crime you have been accused of; extricate oneself from a difficult situation) — добиться оправдания по суду, избежать наказания, уйти от правосудия; отбрехаться, выкрутиться (из положения); выйти сухим из воды;

Example: So far all the main suspects have beaten the rap.

see also
[get away with sth]
[talk one's way out of sth]
[выйти сухим из воды]
[выкрутиться]

Origin:
It is likely that this slang Americanism originated in another expression, take the rap, in which rap is slang for ‘punishment,’ facetiously, from a ‘rap on the knuckles.’ One who takes the rap for someone else stands in for the other’s punishment. Beat the rap … often carries with it the connotation that the miscreant was actually guilty, though acquitted. (From The Whole Ball of Wax, by Laurence Urdang)