We examine the relationship between losing a bid for a public procurement contract and tax avoidance. Losing a bid for a public procurement contract allows the firm to learn about its uncompetitiveness. On the one hand, firms might undertake more tax avoidance to improve their competitiveness. On the other hand, aware of their uncompetitiveness, firms might reduce tax avoidance to reduce any potential negative outcomes of detection. We find that firms that lose a bid for a public procurement contract increase their tax avoidance. This relation is stronger for firms facing stiffer public procurement competition and financially constrained firms. Further, moretax avoidance increases firms' likelihood of winning a subsequent public procurement contract.