The third degree is a very difficult and sometimes brutal questioning, especially by police.
In fact, without its sinister connotation, the expression comes from the Masonic Lodge and its three degrees of membership, each requiring an increasingly difficult examination.
The first is Entered Apprentice, the second is Fellowcraft, and the third degree, the one most difficult to pass, is Master Mason.