This paper gives a skein-theoretic construction of the Hecke algebras based on oriented tangles and the Homfly relations. A similar approach with unoriented tangles and Kauffman's Dubrovnik relations then gives a construction of the Birman-Wenzl algebra