We study several mean field dynamo models in disk geometry in an attempt to understand the origin of the nonaxisymmetric magnetic field present in M81. There appear to be three (at least) relevant mechanisms, which are not mutually exclusive. Because field growth times are not very short compared to galactic ages, a predominantly nonaxisymmetric seed field may still give a significantly nonaxisymmetric field after times of order 10(10) yr, even if the stable field configuration is axisymmetric. The spiral structure may give a non-axisymmetric structure to the disk turbulence, and thus to the turbulent coefficients appearing in mean field dynamo theory. Third, M81 may have undergone a close encounter with a companion galaxy. A dynamical model of the interaction predicts strong, nonaxisymmetric, large-scale gas velocities in the disk plane, and these can produce nonaxisymmetric fields. In the absence of the second of these effects, our models predict that nonaxisymmetric fields will be present in the outer parts of the galaxy, together with significant axisymmetric contributions in the inner part. However, we do not find that any of these effects, taken individually, can produce dominant nonaxisymmetric field structure. If they are simultaneously present, they can reinforce one another. Further, our calculations are for a relatively thick disk (thickness to radius ratio of order 0.2), and a reduction to smaller, and plausibly more realistic, values will also favor nonaxisymmetric field generation.