The analytic hierarchy process is a widely used multi-criteria decision-making method that involves the construction of pairwise comparison matrices. To infer a decision, a consistent or near-consistent matrix is desired, and therefore, several methods have been developed to control or improve the overall consistency of the matrix. However, controlling the overall consistency does not necessarily prevent having strong local inconsistencies. Local inconsistencies are local distortions which can lead to rank reversal when a new alternative is added or deleted. To address this problem, this paper proposes an algorithm for controlling the inconsistency during the construction of the pairwise comparison matrix. The proposed algorithm assists decision makers whilst entering their judgments and does not allow strong local inconsistencies. This algorithm is based on the transitivity rule and has been verified through statistical simulations. Appropriate thresholds of acceptable evaluations have been inferred from these simulations. The paper demonstrates that the proposed algorithm is a helpful decision aid to decision makers when entering pairwise comparison judgments.