In the 1960’s the Soviet military required a replacement for the MiG-21 that could compete with the USAF F-14 Tomcat. It had to be very fast, rapid acceleration, carry a larger payload, capable of a high service ceiling, long range and beyond visual range intercept capabilities. The project was given to the Mikoyan- Gurevich Design Bureau that produced the Model 23-11 that first flew on June 10, 1967. Production began in 1969 and eventually completed over 5,000 swing-wing MiG-23s. A ground-attack variant was also produced, the MiG-27.
On September 22, 1980 the Iran-Iraq War started when Iraq launched attacks on 10 Iranian air bases. The Mig-23s were used for ground attack and interception with the job of main interceptor task going to the MiG-21s. As the conflict wore on Iraq’s MiG-23s were suffering heavy losses so Iraq decided to keep their aging MiG-23MS back as defense for Baghdad. The war lasted until August 20, 1988 and 4012 survived the war because in 1988 it was given a new serial of 23103.