5. D As shown in the figure, take the midpoint $M$ of $B C$, and connect $B_{1} M$. Then, the projection of $A B_{1}$ on the plane $B B_{1} C_{1} C$ is $B_{1} M$. Since $A B_{1} \perp B C_{1}$, by the inverse of the three perpendiculars theorem, we have $B_{1} M \perp B C_{1}$. Taking the midpoint $N$ of $B_{1} C_{1}$, we get $C N \perp B C_{1}$, so $A_{1} C \perp B C_{1}$. From the fact that the side faces of the regular prism are congruent rectangles, we can obtain $A B_{1} \perp A_{1} C, A_{1} B \perp B_{1} C, A_{1} B \perp A C_{1}, B_{1} C \perp A C_{1}$. Therefore, there are 5 pairs of perpendicular relationships in total.
5. In a regular triangular prism $A B C-A_{1} B_{1} C_{1}$, among the six diagonals on the lateral faces $A B_{1}, A_{1} B, B C_{1}, B_{1} C, C_{1} A, C A_{1}$, if one pair $A B_{1} \perp B C_{1}$, how many other pairs, denoted as $k$, are also perpendicular to each other, then $k$ equals
A. 2
B. 3
C. 4
D. 5