We studied the relationship between behavior during milking with milking parlor management, measuring the occurrence of steps and kicks, and cow-related factors. We also investigated the link between stepping and kicking during milking and udder health. A total of 2,903 direct observations of milking behavior were collected in 44 dairy herds in the north of Portugal. The results showed great variability in the occurrence of stepping and kicking among herds during milking. Mixed linear and logistic regression models for factors associated with stepping and kicking were developed. Cows in tandem milking parlors took fewer steps (P < 0.003) than in herringbone ones, although in the tandem milking system, more kicking occurred than in parallel and herringbone systems. Milking room temperatures of more than 27°C led to a higher frequency of kicks among cows (P < 0.010). The practice of overmilking also produced a significantly greater frequency of cow stepping (P < 0.001). Primiparous cows stepped a third less frequently than did greater parity cows but showed a greater tendency to kick compared with the multiparous ones. Cows with somatic cell counts for more than 200,000 cells/mL at the time of the visit also showed a trend toward higher kicking frequency. The results suggest that animal welfare measures, like kicking and stepping, are suitable for epidemiologic studies. Significant interactions were observed when animals were affected by challenging health and welfare situations.