Denial-of-service attacks launched by malicious jammers can pose significant threats to infrastructure-less wireless networks without a centralized controller. While significant recent research efforts have dealt with such attacks and several possible countermeasures have been proposed, little attention has been paid to the idea of cooperative anti-jamming. Inspired by this observation, this paper proposes and studies a cooperative anti-jamming scheme designed to enhance the quality of links degraded by jammers. To achieve this objective, users are allowed to cooperate at two levels. First, they cooperate to optimally regulate their channel access probabilities, so that jammed users gain a higher share of channel utilization. Second, users leverage multiple-input single-output cooperative communication techniques to enhance the throughput of jammed links. The problem of optimal cooperative anti-jamming is formulated as a distributed pricing-based optimization problem, and a best-response algorithm is proposed to solve it in a distributed way. Simulations demonstrate that the proposed algorithm achieves considerable gains (compared with traditional non-cooperative anti-jamming) especially under heavy traffic or high jamming power. Furthermore, the proposed distributed algorithm is shown to achieve close-to-global optimality with moderate traffic load.