Irreligion in Mexico refers to atheism, deism, religious skepticism, secularism, and secular humanism in Mexican society, which was a confessional state after independence from Imperial Spain. The first political constitution of the Mexican United States, enacted in 1824, stipulated that Roman Catholicism was the national religion in perpetuity, and prohibited any other religion. Since 1857, however, by law, Mexico has had no official religion; as such, anti-clerical laws meant to promote a secular society, contained in the 1857 Constitution of Mexico and in the 1917 Constitution of Mexico, limited the participation in civil life of Roman Catholic organizations and allowed government intervention in religious participation in politics.
 In 1992, the Mexican constitution was amended to eliminate the restrictions and granted legal status to religious organizations, limited property rights, voting rights to ministers, and allowed a greater number of priests in Mexico. Nonetheless, the principles of the separation of church and state remain; members of religious orders (priests, nuns, ministers, et al.) cannot hold elected office, the federal government cannot subsidize any religious organization, and religious orders, and their officers, cannot teach in the public school system.
 Historically, the Roman Catholic Church dominated the religious, political, and cultural landscapes of the nation; yet, the Catholic News Agency said that there exists a great secular community of atheists, intellectuals and irreligious people, reaching 10% according to recent polls by religious agencies.
 According to the 2020 census, 8% of the population is nonreligious.
 Since the Spanish Conquest (1519–21), the Roman Catholic Church has held prominent social and political positions concerning the moral education of Mexicans – the ways that virtues and morals are to be socially implemented – and thus contributed to the Mexican cultural identity. Such cultural immanence was confirmed in the nation's first political constitution, which formally established Catholicism as the state religion while prohibiting all others. Article 3 of the 1824 Constitution of Mexico established that:
 The Religion of the Mexican Nation, is, and will be perpetually, the Roman Catholic Apostolic. The Nation will protect it by wise and just laws, and prohibit the exercise of any other whatever".
(Article 3 of the Federal Constitution of the Mexican United States, 1824) For most of Mexico's 300 years as the Imperial Spanish colony of the Viceroyalty of New Spain (1519–1821), the Roman Catholic Church was an active political actor in colonial politics. In the early period of the Mexican nation, the vast wealth and great political influence of the Church spurred a powerful anti-clerical movement, which found political expression in the Liberal Party. By the middle of the 19th century, there were reforms limiting the political power of the Mexican Catholic Church. In response, the Church supported seditious Conservative rebels to overthrow the anti-clerical Liberal government of President Benito Juárez and welcomed the anti-Juárez French intervention in Mexico (1861), which established the military occupation of Mexico by the Second French Empire, under Emperor Napoleon III.
 About the Mexican perspective of the actions of the Roman Catholic Church, the Mexican Labour Party activist Robert Haberman said:
 
By the year 1854, The Church gained possession of about two-thirds of all the lands of Mexico, almost every bank, and every large business. The rest of the country was mortgaged to the Church. Then came the revolution of 1854, led by Benito Juárez. It culminated in the Constitution of 1857, which secularised the schools and confiscated Church property. All the churches were nationalised, many of them were turned into schools, hospitals, and orphan asylums. Civil marriages were obligatory. Pope Pius IX immediately issued a mandate against the Constitution, and called upon all Catholics of Mexico to disobey it. Ever since then, the clergy has been fighting to regain its lost temporal power and wealth. (The Necessity of Atheism, p. 154) At the turn of the 19th century, the collaboration of the Mexican Catholic Church with the Porfiriato, the 35-year dictatorship of General Porfirio Díaz, earned the Mexican clergy the ideological enmity of the revolutionary victors of the Mexican Revolution (1910–20); thus, the Mexican Constitution of 1917 legislated severe social, political, economic and cultural restrictions upon the Catholic Church in the Republic of Mexico. Historically, the 1917 Mexican Constitution was the first political constitution to explicitly legislate the social and civil rights of the people and served as constitutional model for the Weimar Constitution of 1919 and the Russian Constitution of 1918. Nevertheless, like the Spanish Constitution of 1931, it has been characterized as being hostile to religion.
 The Constitution of 1917 prohibited the Catholic clergy from working as teachers and as instructors in public and private schools; established State control over the internal matters of the Mexican Catholic Church; nationalized all Church property; proscribed religious orders; forbade the presence in Mexico of foreign-born priests; granted each state of the Mexican republic the power to limit the number of, and to eliminate, priests in its territory; disenfranchised priests of the right to vote and to hold elected office; banned Catholic organizations that advocated public policy; forbade religious publications from editorial commentary about public policy; prohibited the clergy from wearing clerical garb in public; and voided the right to trial of any Mexican citizen who violated anti-clerical laws.
 During the Mexican Revolution (1910–20), the national rancour provoked by the history of the Catholic Church's mistreatment of Mexicans was aggravated by the collaboration of the Mexican High Clergy with the pro–U.S. dictatorship (1913–14) of General Victoriano Huerta, "The Usurper" of the Mexican Presidency; thus, anti-clerical laws were integral to the Mexican Constitution of 1917, in order to establish a secular society. In the 1920s, the enforcement of the Constitutional anti-clerical laws by the Mexican Federal Government provoked the Cristero Rebellion (1926–29), the clerically-abetted armed revolt of Catholic peasants known as "The Christers" (Los cristeros). The social and political tensions between the Catholic Church and the Mexican State lessened after 1940, but the constitutional restrictions remained the law of the land, although their enforcement became progressively lax. The government established diplomatic relations with the Holy See during the administration of President Carlos Salinas de Gortari (1988–94) and the Government lifted almost all restrictions on the Catholic Church in 1992. That year, the government ratified its informal policy of not enforcing most legal controls on religious groups by, among other things, granting religious groups legal status, conceding them limited property rights, and lifting restrictions on the number of priests in the country. However, the law continues to mandate strict restrictions on the church and bars the clergy from holding public office, advocating partisan political views, supporting political candidates, or opposing the laws or institutions of the state. The Church's ability to own and operate mass media is also limited. Indeed, after the creation of the Constitution, the Catholic Church has been acutely hostile towards the Mexican government. As Laura Randall in his book Changing Structure of Mexico points out, most of the conflicts between citizens and religious leaders lie in the Church's overwhelming lack of understanding of the role of the state's laicism. "The inability of the Mexican Catholic Episcopate to understand the modern world translates into a distorted conception of the secular world and the lay state. Evidently, perceiving the state as anti-religious (or rather, anti-clerical) is the result of 19th-century struggles that imbued the state with anti-religious and anti-clerical tinges in Latin American countries, much to the Catholic Church's chagrin. Defining laicist education as a 'secular religion' that is also 'imposed and intolerant' is the clearest evidence of episcopal intransigence."
 From 1940 to 1960, about 70% of Mexican Catholics attended church weekly while in 1982, only 54% partook of Mass once a week or more, and 21% claimed monthly attendance. Recent surveys have shown that only around 3% of Catholics attend church daily; however, 47% percent of them attend church services weekly  and, according to INEGI, the number of atheists grows annually by 5.2% while the number of Catholics grows by 1.7%.