The number of murders in Mexico rose sharply last year, pushing the homicide rate to its highest level since at least 1990 as violence among drug gangs persisted and highlighting the challenge faced by the incoming administration to contain criminal violence.

The National Statistics Institute said Monday the number of murders rose 27% last year to 31,174, the most on record going back to 1990 and equivalent to 25 per 100,000 inhabitants. The homicide rate rose from 20 per 100,000 in 2016, and was above the recent high of 24...