I investigate the Poisson-sigma model on the classical and quantum level. First I show how the interaction can be obtained by a deformation of the classical master equation of an Abelian BF theory in two dimensions. On the classical level this model includes various known two-dimensional field theories, in particular the Yang–Mills theory. On the quantum level the perturbation expansion of the path integral in the covariant gauge yields the Kontsevich deformation formula. Finally I perform the calculation of the path integral in a general gauge, and demonstrate how the derived partition function reduces in the special case of a linear Poisson structure to the familiar form of 2D Yang–Mills theory.