We analyze the nature of the phase transition from a smectic stripe phase to a tetragonal phase predicted in analytic studies by Abanov et al. [Phys. Rev. B 51, 1023 (1995)] and observed in experiments on ultrathin magnetic films by Vaterlaus et al. [Phys. Rev. Lett. 84, 2247 (2000)]. At variance with existent numerical evidence, we show results of Monte Carlo simulations on a two-dimensional model with competing exchange and dipolar interactions showing strong evidence that the transition is a weak first-order one, in agreement with the theoretical predictions of Abanov et al. Besides the numerical evidence, we give further support to the first-order nature of the transition analyzing a continuum version of the model and showing that it belongs to a large family of systems, or universality class, in which a first-order transition driven by fluctuations is expected on quite general grounds.