The motion of a two-dimensional flag at a time-dependent angle of incidence to an irrotational flow of an inviscid, incompressible fluid is examined. The flag is modelled as a thin, flexible, impermeable membrane of finite mass with bending stiffness. The flag is fixed at the leading edge where it is assumed to be either freely hinged or clamped with zero gradient. The angle of incidence to the outer flow is assumed to be small and thin aerofoil theory and simple beam theory are employed to obtain a partial singular integro-differential equation for the flag shape. Steady solutions to the problem are calculated analytically for various limiting cases and numerically for order one values of a non-dimensional parameter that measures the relative importance of outer flow momentum flux and flexural rigidity. For the unsteady problem, the stability of steady solutions depends only upon two non-dimensional parameters. Stability analysis is performed in order to identify the regions of instability. The resulting quadratic eigenvalue problem is solved numerically and the marginal stability curves for both the hinged and the clamped flags are constructed. These curves show that both stable and unstable solutions may exist for various values of the mass and flexural rigidity of the membrane and for both methods of attachment at the leading edge. In order to confirm the results of the linear stability analysis, the full unsteady flag equation is solved numerically using an explicit method. The numerical solutions agree with the predictions of the linear stability analysis and also identify the shapes that the flag adopts according to the magnitude of the flexural rigidity and mass.