We present optical photometric and spectroscopic observations of the 1987A-like supernova (SN) 2009mw. Our BVRI and g′r′i′z′ photometry covers 167 d of evolution, including the rise to the light-curve maximum, and ends just after the beginning of the linear tail phase. We compare the observational properties of SN 2009mw with those of other SNe belonging to the same subgroup and find that it shows similarities to several objects. The physical parameters of the progenitor and the SN are estimated through hydrodynamical modelling, and yield an explosion energy of 1 foe, a pre-SN mass of 19 M⊙, a progenitor radius of 30 R⊙ and a 56Ni mass of 0.062 M⊙. These values indicate that the progenitor of SN 2009mw was a blue supergiant star, similar to the progenitor of SN 1987A. We examine the host environment of SN 2009mw and find that it emerged from a population with a slightly subsolar metallicty.