This article models the process of bidding for government contracts in the presence of moral hazard. Several (possibly risk-averse) potential contractors (agents) submit sealed bids, on the basis of which the government (principal) selects one to perform a task. The optimal linear contract is derived. The bidding process induces the potential agents to reveal their relative expected costs. The optimal contract trades off giving the chosen agent an incentive to limit costs against stimulating bidding competition and sharing risks. The optimal contract is never cost-plus, may befixed-price, but is usually an incentive contract. Some prescriptions for government contracting emerge. * When the government offers a contract for a project such as the construction of a road or a warship, it usually calls for bids from interested firms and selects the lowest bidder. There are several informational asymmetries in this process. The government cannot directly observe any bidder's expected production costs, and therefore it does not know which is the efficient firm. Each bidder must determine his bid in ignorance of the expected costs of his rivals. After a bidder has been selected, he is better informed than the government about the vagaries of the particular project; thus, the government is unable to observe how much effort the firm is making to limit production costs. The government must design a contract to address both adverse selection (the government does not know the expected cost of any firm) and moral hazard (the government cannot observe the selected firm's effort to keep its realized production costs low). To complicate matters, if the firms are risk averse, it is in the government's interest to offer a contract in which the government bears some of the risk of unpredictable cost fluctuations. The forms of contract used in practice by governments make the payment to the contractor a linear function of its bid and/or its realized costs. With a fixed-price contract, the payment is simply the firm's bid. With a cost-plus contract, the government agrees to cover completely the costs incurred by the contractor, plus pay a fee that is either fixed in advance or is a proportion of costs. An incentive contract makes the payment depend both on the bid and on realized costs: if realized costs exceed the firm's bid, the firm is responsible for