With the increased factory automation and extensive use of computers in manufacturing environments, development and use of computer-aided process planning (CAPP) systems is inevitable. Machining sequence planning is one of the most important functions in process planning activities. However, less attention has been paid to automation of this function in most of existing CAPP systems. This is mainly due to the fact that machining sequence planning is the most difficult part of process planning to capture in a computer program. To deal with this problem, an algorithm has been developed for automatic machining sequence planning of prismatic parts. The algorithm is based on bilateral precedence between machining operations and generates feasible and optimal machining sequences resulting in reduced machining costs and times. This algorithm has been described in this paper.