The purpose of the study was to analyze the relations between perception of a motivational climate, motivational mediators, self-determined motivation and discipline, as well as the motivational variables that predicted discipline and indiscipline. For it, Learning and Performance Orientations in Physical Education Classes Questionnaire (LAPOPECQ), Educative Motivation Scale (EME), Basic Psychological Needs Scale (BPNES) and Disciplined and Undisciplined behaviours in Physical Education Classes Inventory (ICDIEF) were given to 155 students of the second cycle of E. S. O and 1st course of Baccalaureate. The results showed that discipline related positively and significantly with perception of a task climate, intrinsic and extrinsic motivation and negatively and significantly with amotivation. On the other hand, discipline was predicted positively by task climate, and indiscipline positively by amotivation, ego climate and competence mediator, and negatively by autonomy mediator. Therefore it should be principally fomented a task-involving climate in physical education classes, avoiding that students fell in amotivation, favoring the basic psychological needs' satisfaction and, as a result, the most self-determined motivational shapes.