PurposeThe purpose of this paper is to examine earnings management practices in local governments (LGs). The implementation of accrual accounting in LGs opens the way for empirical research on the topic, as reporting high surpluses or high deficits can be negatively interpreted by the central government, monitoring authorities, citizens and political opponents. According to public choice theory, the conflicting interests between politicians, who pursue re-election, and voters, who observe politicians’ actions to assess their alignment with social welfare, create fertile ground for earnings management practices.Design/methodology/approachThe study calculates discretionary accruals, by using the Jones (1991) model, and relates them to several political variables. It employs a large sample of Greek and Italian LGs. The Greek database covers the period from 2002 to 2015 with about 4,300 observations, and the Italian database includes the period from 2008 to 2015 with about 1,130 observations.FindingsThe findings from the analysis give evidence that LGs engage in earnings management. The principal factor is the electoral cycle, as earnings management seems to be greater when the mayor is re-elected than when the mayor is elected for the first time. Furthermore, the period before elections create conditions that cultivate earnings management attitudes.Research limitations/implicationsPrevious studies have principally investigated earnings management in the private sector. Considering that many public-sector entities have implemented accrual accounting systems, this study intends to examine earnings management behaviour at the LG level, providing interesting findings for researchers and policy makers.Practical implicationsA better understanding of the political factors and the financial conditions, which act as obstacles or facilitators, should work hand in hand with the accounting reforms. The usefulness of financial statements for decision making and control presupposes that they are of high quality, an attribute that can be impaired by earnings management.Originality/valueThis study investigates the influence of political factors on earnings management behaviour in public-sector contexts where self-interest and accountability pressures coexist.