An electric power steering apparatus that calculates a motor current command value 1 based on a steering torque and a vehicle speed, drives a motor based on said motor current command value 1 so as to perform an assist control of a steering system, and has a function for switching between an automatic steering mode and a manual steering mode, characterized in that said electric power steering apparatus comprises: a steering angle control section that calculates a motor current command value 2 to get an actual steering angle close to a target steering angle; a torque integral judging section that outputs a steering torque judging signal by comparing an integral output value obtained by integrating an absolute value of said steering torque and an integral threshold; and a switching section that inputs said motor current command value 1 and said motor current command value 2, and is switched in accordance with a switching signal which switches between said automatic steering mode and said manual steering mode or said steering torque judging signal; wherein said torque integral judging section comprises a torque value comparing section that compares said absolute value of said steering torque with a torque threshold, and outputs said absolute value as an output signal, an integral calculating section that integrates said output signal so as to output said integral output value, and a switch judging section that outputs said steering torque judging signal by comparing said integral output value from said integral calculating section and said integral threshold; and wherein said integral calculating section starts an integral calculation of said output signal when said absolute value of said steering torque runs up to said torque threshold in said automatic steering mode, and said switching section switches from said automatic steering mode to said manual steering mode when said integral output value runs up to said integral threshold. a steering angle control section that calculates a motor current command value 2 to get an actual steering angle close to a target steering angle; a torque integral judging section that outputs a steering torque judging signal by comparing an integral output value obtained by integrating an absolute value of said steering torque and an integral threshold; and a switching section that inputs said motor current command value 1 and said motor current command value 2, and is switched in accordance with a switching signal which switches between said automatic steering mode and said manual steering mode or said steering torque judging signal; wherein said torque integral judging section comprises a torque value comparing section that compares said absolute value of said steering torque with a torque threshold, and outputs said absolute value as an output signal, an integral calculating section that integrates said output signal so as to output said integral output value, and a switch judging section that outputs said steering torque judging signal by comparing said integral output value from said integral calculating section and said integral threshold; and wherein said integral calculating section starts an integral calculation of said output signal when said absolute value of said steering torque runs up to said torque threshold in said automatic steering mode, and said switching section switches from said automatic steering mode to said manual steering mode when said integral output value runs up to said integral threshold.