The paper investigates theoretically and empirically the role of courts for contract enforcement in transition agriculture. In a survey of 306 Polish hog farmers conducted in 1999, only 38.5% of them reported to believe that they could use courts to enforce contracts with their most important customer. Furthermore, those who believe the legal system could be used would accept significant financial losses before taking action. We develop a theoretical model, based on the costs and benefits of court enforcement, which captures the boundary between contracts to be regarded as "enforceable" and "not-enforceable" and, simultaneously, the threshold of taking legal action. The empirical analysis strongly supports our model: (1) the farmers' responds can be explained by cost-benefit calculations regarding the use of courts, (2) the legal "enforceability" of contracts depends on not only the efficiency of the legal system, but also on the attributes of the transaction, the contracts and the relationship between buyer and seller, and (3) the threshold of taking legal action is significantly influenced by indirect costs of court enforcement, such as the disruption of a valuable relationship, and by the availability of alternative enforcement mechanisms.