Mexico’s ruling Institutional Revolutionary Party (PRI) has narrowly defeated a leftist challenger in the central state of Mexico.