We study a problem of stable cooperation on a single-product market where firms are in competitive relationship. Firms compete in quantities, but the maximum quantity of the product to be produced by any firm is bounded which is common knowledge. We assume that firms may cooperate forming coalitions, and the firms belonging to the same coalition choose their quantities to maximize the joint profit. The problem is to find a partition of the firms — a coalition structure — which is stable against unilateral deviations of any firm. For this reason, we first determine the worth of any coalition taking into account the joint profit of the firms involved, and second allocate this worth in accordance with a cooperative solution.