The Spanish usurpation of the territory that nowadays makes up San Martín, dating from 1563, when Captain Pedro Moyano Cornejo crossed the Mendoza River and installed himself in the east of it, in the lands that belonged to Pallamay chieftain. At first that area was known as Rodeo Moyano or La Reducción.
Soon the territory of Mendoza was divided into three parishes run by the Catholic Church. The current San Martín was part of one of them: Corocorto. The first Spaniard settlers established themselves in the angle formed by the rivers Mendoza and Tunuyán, which due to its characteristic of flooding area was called Los Barriales.
The development of the area was driven by the installation of the village, which nowadays is know as San Martín, and that along the years has used the water resources, with the construction of canals, forming one of the most important irrigated oasis.
However, who actually gave the final impetus to the area, was the General José de San Martín, at the beginning of the military campaign that would lead to the independence of Chile and Peru.
The objective of the General was to help the Armies of the Chilean Bernardo O’Higgins to defeat the Spaniard Royalties, and therefore he considered Mendoza as the ideal place to underpin this initiative. He led to the population of the area by selling land, as he feared it was going to be invaded. He received two hundred hectares, in which he promoted the cultivation using irrigation, of vineyards and fruit orchards, and he also installed the first flour mill.
After that, on December 20, 1816 the Governor of Mendoza Toribio de Luzuriaga, formally founded the village with the name of Villa de los Barriales. However, in 1823 by a decree of the then Governor Pedro Molina, the city was named San Martín in tribute to the General.
Later in 1885, with the arrival of the railroad, the construction of the railway workshops in the nearby city of Palmira, and the ensuing arrival of the immigrants, especially Italians and Spaniards, it became one of the most important railway stations in the country.
Finally, in mid-twentieth century, the construction of the National Route 7, which communicates Buenos Aires and Mendoza with Santiago de Chile, once again positioned the Department of San Martín as a strategic location.