a b s t r a c tThe paper studies a discrete counterpart of Gerber et al. (2006). The surplus of an insurance company (before dividends) is modeled as a time-homogeneous Markov chain with possible changes of size +1, 0, −1, −2, −3, . . . . If a barrier strategy is applied for paying dividends, it is shown that the dividends-penalty identity holds. The identity expresses the expected present value of a penalty at ruin in terms of the expected discounted dividends until ruin and the expected present value of the penalty at ruin if no dividends are paid. For the problem of maximizing the difference between the expected discounted dividends until ruin and the expected present value of the penalty at ruin, barrier strategies play a prominent role. In some cases an optimal dividend barrier exists. The paper discusses in detail the special case where the distribution of the change in surplus does not depend on the current surplus (so that in the absence of dividends the surplus process has independent increments). A closed-form result for zero initial surplus is given, and it is shown how the relevant quantities can be calculated recursively. Finally, it is shown how optimal dividend strategies can be determined; typically, they are band strategies.