Both. Often times in places like the military merit is only achievable as a function of seniority. So after x number of years after getting a grade you qualify to be promoted to the next. Whether or not the promotion happens at that point in time is a function of merit (and social skills).