Context. Disk galaxies are the most common galaxy population in the local universe. However, the formation of their disks and structures -in particular their bars -is still a matter of debate. Aims. We present a physical model of the formation of J033239.72-275154.7, a galaxy observed at z = 0.41 that contains a large, young bar of size 6 kpc. The study of this system is particularly interesting to the understanding of the connection between mergers and bars, as well as the properties and fate of this system in relation to disk galaxy formation. Methods. We compare the morphological and kinematic properties of J033239.72-275154.7, the latter obtained by the GIRAFFE spectrograph, to those derived from the merger of two spiral galaxies described by idealized N-body simulations, including a star formation prescription. Results. We found that the general morphological shape and most of the dynamical properties of the object can be well reproduced by a model in which the satellite is initially placed in a retrograde orbit and the mass ratio of the system is 1:3. In this scenario, a bar forms in the host galaxy after the first passage of the satellite, where a significant fraction of the available gas is consumed in an induced burst. In its later evolution, however, we find that J033239.72-275154.7, whose major progenitor was an Sab galaxy, will probably become a S0 galaxy. This is mainly due to the violent relaxation and the angular momentum loss experienced by the host galaxy during the merger process, which is caused by the adopted orbital parameters. This result suggests that the building of the Hubble sequence is influenced significantly by the last major collision. In the present case, the merger leads to a severe damage of the disk of the progenitor, leading to an evolution towards a more bulge-dominated galaxy. Conclusions.