Using recently developed molecular-shape description algorithms, we searched the Available Chemical Directory for known compounds similar in shape to the potent HIV-1 protease inhibitor Merck L-700,417; 15 compounds most similar in shape to the inhibitor were selected for testing in vitro. Four of these inhibited the protease at 100 microM or less and the most active of the four were the naturally occurring pigments biliverdin and bilirubin. Biliverdin and bilirubin inhibited recombinant HIV-1 protease in vitro at pH 7.8 with K1 values of approx. 1 microM, and also inhibited HIV-2 and simian immunodeficiency virus proteases. The related pyrrolic pigments stercobilin, urobilin, biliverdin dimethyl ester and xanthobilirubic acid showed similar inhibitory activity at low micromolar concentrations. Biliverdin, bilirubin and xanthobilirubic acid did not inhibit viral polyprotein processing in cultured cells, but they reduced viral infectivity significantly. At 100 microM, xanthobilirubic acid affected viral assembly, resulting in a 50% decrease in the generation of infectious particles. In contrast, at the same concentrations biliverdin and bilirubin exerted little or no effect on viral assembly but blocked infection of HeLaT4 cells by 50%. These results suggest that bile pigments might be a new class of potential lead compounds for developing protease inhibitors and they raise the question of whether hyperbilirubinaemia can influence the course of HIV infection.