A male law professor at a prestigious private university in Mexico has resigned after he criticized a policy that allowed female students to be absent on a national day of protest against gender violence and discrimination and suggested that women be excluded entirely from law school.

The Universidad Panamericana said in a statement Thursday that the professor had “recognized his mistake and presented his resignation, which was accepted immediately.” The statement, signed by a committee that oversees the school’s law faculty, called the incident “unacceptable.”