Galaxy surveys have suggested that rapid and sustained decrease in the star-formation rate, quenching, in massive disk galaxies is frequently related to the presence of a bar. Optical and near-IR observations reveal that nearly 60% of disk galaxies in the local universe are barred, thus it is important to understand the relationship between bars and star formation in disk galaxies. Recent observational results imply that the Milky Way quenched about 9-10 Gyr ago, at the transition between the cessation of the growth of the kinematically hot, old, metal-poor thick disk and the kinematically colder, younger, and more metal-rich thin disk. Although perhaps coincidental, the quenching episode could also be related to the formation of the bar. To explore the relation between bar formation and star formation in gas rich galaxies quantitatively, we simulated gas-rich disk isolated galaxies. Our simulations include prescriptions for star formation, stellar feedback, and for regulating the multi-phase interstellar medium. We find that the action of stellar bar efficiently quenches star formation, reducing the star-formation rate by a factor of 10 in less than 1 Gyr. Analytical and self-consistent galaxy simulations with bars suggest that the action of the stellar bar increases the gas random motions within the co-rotation radius of the bar. Indeed, we detect an increase in the gas velocity dispersion up to 20-35 km/s at the end of the bar formation phase. The star-formation efficiency decreases rapidly, and in all of our models, the bar quenches the star formation in the galaxy. The star-formation efficiency is much lower in simulated barred compared to unbarred galaxies and more rapid bar formation implies more rapid quenching.