A gain-of-function mutant of the lymphoid phosphatase Lyp (PTPN22) has recently been implicated in type 1 diabetes and other autoimmune diseases, suggesting that small-molecule inhibitors of Lyp could be useful for the treatment of autoimmunity. Virtual ligand screening (VLS) was applied in the search for hit compounds. Two different docking algorithms, FlexX and ICM, were used to screen a library of 'drug-like' molecules against two different 3D structures, representing the catalytic site of Lyp in both the inactive 'open' and active 'closed' conformations. The top-scoring compounds of each VLS run were tested for their inhibitory activity against recombinant Lyp. Interestingly, VLS with both active and inactive conformations yielded very potent hits, with IC(50) values in the sub- and low-micromolar range. Moreover, many of these hits showed high docking scores only with one conformation. For instance, this was the case with several 2-benzamidobenzoic acid derivatives, which specifically docked into the inactive open form. Tryptophan fluorescence measurements further support a binding mode in which these compounds seem to stabilize the phosphatase in its inactive conformation.