Between the Devil and the deep blue sea - origin. More 'devil' uses.

: : The Devil - Caulker's name for the seam in the upper deck planking next to a ship's waterways. There was very little space to get at this seam, making it a difficult and awkward job. This is the origin of the expression "Between the devil and the deep blue sea, since there is only the thickness of the ship's hull planking between this seam and the sea. also known as the garboard seam.

: Let the devil take the hindmost may well be said when someone doesn't care too much about the outcome of his actions, as long as he comes out well from the affair. The saying comes from late medieval magic. The Devil was supposed to have a school at either Toledo or Salamanca in Spain. The students, at a certain stage of their training, had to run through a subterranean hall. The last one through was seized by the Devil and became his Imp.
: The devil to pay: this saying has nothing whatsoever to do with "Old Nick" or handing out money. It is part of a longer saying, the last bit of which has been nearly forgotten. It goes; The devil to pay, and no pitch hot". In this instance the "devil" is the heavy wooden beam used to support the big guns on sailing ships. It was also known as the Gunwhale and was a very difficult place to get at for maintenance with the tar (=pitch) needed to regularly seal (=pay) the gaps in the ship's sides. From this difficulty comes another related saying "between the devil and the deep blue sea", the devil here again being the wooden beam.
: "Go to the Devil" is a saying which has more to do with Old Nick. In this instance The Devil was the name of a 17th century London pub near the Temple Bar, often frequented by lawyers. The Inn sign was St Dunstan pulling the Devil's nose and the saying was a deliberate play on the double meaning of the words. Clients arriving at lawyers' offices were regularly told Go to the Devil because that happened to be where the lawyer was at that particular time. However nice this story seems it probably is not true since the expression dates back at least to the 12th century. Pity!