Pathological gambling (PG) is characterized by persistent, maladaptive gambling behavior, which disrupts personal and professional life. Animal models of gambling behavior could make a significant contribution to improving our understanding of the neural and neurochemical basis of gambling, and the treatment of PG. When gambling, failing to win critically results in the loss of resources wagered as well as the absence of additional gain. Here, we have incorporated these concepts into a novel rat gambling task (rGT), based, in part, on the 'Iowa' gambling task (IGT) commonly used clinically to measure gambling-like behavior. Rats choose among four different options to earn as many sugar pellets as possible within 30 min. Each option is associated with the delivery of a different amount of reward, but also with a different probability and duration of punishing time-out periods during which reward cannot be earned. The schedules are designed such that persistent choice of options linked with larger rewards result in fewer pellets earned per unit time. Rats learn to avoid these risky options to maximize their earnings, comparable with the optimal strategy in the IGT. Both d-amphetamine and the 5-HT(1A) receptor agonist, 8-OH-DPAT, impaired task performance. In contrast, the dopamine D(2) receptor antagonist, eticlopride, improved performance, whereas the D(1) receptor antagonist, SCH23390, had no effect. These data suggest that both serotonergic and dopaminergic agents can impair and improve gambling performance, and indicate that the rGT will be a useful tool to study the biological basis of gambling.