We describe a model that estimates the optimal total expected cost of a wildland fire, given uncertainty in both flame length and fire-line width produced. In the model, a sequence of possible fire-line perimeters is specified, each with a forecasted control time. For a given control time and fire line, the probability of containment of the fire is determined as a function of the fire-fighting resources available. Our procedure assigns the resources to the fire line so as to minimize the total expected cost. A key feature of the model is that the probabilities reflect the degree of uncertainty in (i) the width of fire line that can be built with a given resource allocation, and (ii) the flame length of the fire. The total expected cost associated with a given choice of fire line is the sum of: the loss or gain of value of the area already burned; the cost of the resources used in the attack; and the expected loss or gain of value beyond the fire line. The latter is the product of the probability that the chosen attack strategy fails to contain the fire and the value of the additional burned area that would result from such a failure. The model allows comparison of the costs of the different choices of fire line, and thus identification of the optimal strategy. A small case study is used to illustrate the procedure.