The validity of the K-quantum number in rapidly rotating warm nuclei is investigated as a function of thermal excitation energy U and angular momentum I, for the rare-earth nucleus 163 Er. The quantal eigenstates are described with a shell model which combines a cranked Nilsson mean-field and a residual two-body interaction, together with a term which takes into account the angular momentum carried by the K-quantum number in an approximate way. K-mixing is produced by the interplay of the Coriolis interaction and the residual interaction; it is weak in the region of the discrete rotational bands (U < ∼ 1MeV), but it gradually increases until the limit of complete violation of the K-quantum number is approached around U ∼ 2 − 2.5 MeV.The calculated matrix elements between bands having different K-quantum numbers decrease exponentially as a function of ∆K, in qualitative agreement with recent data.