MiG-23B
The first Flogger attack variant was powered by the AL-21F. Only 24 were produced, due a lack of engines (the AL-21F was destined for the Sukhoi Su-17/22 and the Su-24 Fencer).
It was armed with the GSh-23L cannon, carrying 200 rounds.

MiG-23BN
Derived from the MiG-23B, but powered by the R29B-300 engine.
This gave the advantage of making this variant exportable (the AL-21F was a restricted engine at the time, unlike the R29B-300).
The R29B-300 also offered commonality with the MiG-23MS and MiG-23MF fighter variants already sold to the rest of world.
It was armed with the GSh-23L cannon, with 200 rounds.

MiG-27 (MiG-23BM)
This was the first in the MiG-27 family to have a canopy without the central frame, suggesting that the ejection seat was designed to directly break through the transparency.
The dielectric head above the pylon on the MiG-23 was used on the MiG-27 to house electro-optical and radio-frequency gear instead.
It was also the first variant armed with a Gryazev-Shipunov GSh-6-30M Gatling gun.
Its NATO reporting name was Flogger-D.
MiG-27K
NATO reporting name: Flogger-J2.
The MiG-27K was most advanced Soviet variant, with a laser designator and compatibility with TV-guided electro-optical weapons.
It carried the GSh-6-30 cannon.
Around 200 were built.

MiG-27M
NATO reporting name: Flogger-J. This model was a cheaper variant than the MiG-27K, but much better than the MiG-23B, MiG-23BN, and MiG-27 (MiG-23BM), with the electro-optical and radio-frequency heads above the glove pylons deleted.
It was first armed with the GSh-6-23M Gatling gun, but this was later replaced by a new 30 mm GSh-6-30 six-barrel cannon with 260 rounds of ammunition in a fuselage gondola.
It also received much-improved electronic countermeasure (ECM) systems, and a new PrNK-23K nav/attack system providing automatic flight control, gun firing, and weapons release.
However, this modification was not very successful because of the heavy recoil from the new cannon, and bursts longer than two or three seconds often led to permanent damage to the airframe.
 Test pilot V. N. Kondaurov described the first firing of the GSh-6-30А: "As I imposed the central mark on the air target and pressed the trigger to shoot, I heard such noise that I involuntarily drew my hand aside.
The whole plane began to vibrate from the shooting and had almost stopped from the strong recoil of the gun.
The pilotless target, which was just making a turn ahead of me, was literally disintegrating into pieces.
I have hardly come to my senses from unexpectedness and admiration: This is a calibre!
Such a beast!
If you hit something — it will be plenty enough [to wipe it out]".
A total of 200 MiG-27Ms were built from 1978 to 1983, plus 160 for India.
Sri Lanka used second-hand Soviet built Mig-27M.
MiG-27D
All MiG-27D are MiG-27s (MiG-23BMs) upgraded to MiG-27M standard.
It is very difficult to distinguish from the MiG-27M. 305 were upgraded.

MiG-27ML
This was an export variant of the MiG-27M provided in 1986 to India in knock-down kits for license-assembly.
It was the same as the MiG-27M, except the undernose fairing for the infra-red search and track (IRST) sensor had a single window instead of several, like the one on the original MiG-27M. A total of 150 were assembled by India.
India refers to this model as the MiG-27M Bahadur, while MiG-27L is the Mikoyan export designation.

MiG-27H
This was a 1988 indigenous Indian upgrade of its license-assembled MiG-27L with French avionics, which provides the same level of performance, but with much reduced size and weight.
The capabilities of the aircraft are being enhanced by the incorporation of modern avionics systems consisting primarily of two Multi-Function Displays (MFDs) Mission and Display Processor (MDP), Sextant Ring Laser Gyros (RLG INSI), combined GPS/GLONASS navigation, HUD with UFCP, Digital Map Generator (DMG), jam-resistant Secured Communication, stand-by UHF communication, data link and a comprehensive Electronic Warfare (EW) Suite.
A mission planning and retrieval facility, VTR and HUD Camera will also be fitte
MiG-23B
The first Flogger attack variant was powered by the AL-21F. Only 24 were produced, due a lack of engines (the AL-21F was destined for the Sukhoi Su-17/22 and the Su-24 Fencer). It was armed with the GSh-23L cannon, carrying 200 rounds.
MiG-23BN
Derived from the MiG-23B, but powered by the R29B-300 engine. This gave the advantage of making this variant exportable (the AL-21F was a restricted engine at the time, unlike the R29B-300). The R29B-300 also offered commonality with the MiG-23MS and MiG-23MF fighter variants already sold to the rest of world. It was armed with the GSh-23L cannon, with 200 rounds.
MiG-27 (MiG-23BM)
This was the first in the MiG-27 family to have a canopy without the central frame, suggesting that the ejection seat was designed to directly break through the transparency. The dielectric head above the pylon on the MiG-23 was used on the MiG-27 to house electro-optical and radio-frequency gear instead. It was also the first variant armed with a Gryazev-Shipunov GSh-6-30M Gatling gun. Its NATO reporting name was Flogger-D.
MiG-27K
NATO reporting name: Flogger-J2. The MiG-27K was most advanced Soviet variant, with a laser designator and compatibility with TV-guided electro-optical weapons. It carried the GSh-6-30 cannon. Around 200 were built.
MiG-27M
NATO reporting name: Flogger-J. This model was a cheaper variant than the MiG-27K, but much better than the MiG-23B, MiG-23BN, and MiG-27 (MiG-23BM), with the electro-optical and radio-frequency heads above the glove pylons deleted. It was first armed with the GSh-6-23M Gatling gun, but this was later replaced by a new 30 mm GSh-6-30 six-barrel cannon with 260 rounds of ammunition in a fuselage gondola. It also received much-improved electronic countermeasure (ECM) systems, and a new PrNK-23K nav/attack system providing automatic flight control, gun firing, and weapons release. However, this modification was not very successful because of the heavy recoil from the new cannon, and bursts longer than two or three seconds often led to permanent damage to the airframe.  Test pilot V. N. Kondaurov described the first firing of the GSh-6-30А: "As I imposed the central mark on the air target and pressed the trigger to shoot, I heard such noise that I involuntarily drew my hand aside. The whole plane began to vibrate from the shooting and had almost stopped from the strong recoil of the gun. The pilotless target, which was just making a turn ahead of me, was literally disintegrating into pieces. I have hardly come to my senses from unexpectedness and admiration: This is a calibre! Such a beast! If you hit something — it will be plenty enough [to wipe it out]". A total of 200 MiG-27Ms were built from 1978 to 1983, plus 160 for India. Sri Lanka used second-hand Soviet built Mig-27M.
MiG-27D
All MiG-27D are MiG-27s (MiG-23BMs) upgraded to MiG-27M standard. It is very difficult to distinguish from the MiG-27M. 305 were upgraded.
MiG-27ML
This was an export variant of the MiG-27M provided in 1986 to India in knock-down kits for license-assembly. It was the same as the MiG-27M, except the undernose fairing for the infra-red search and track (IRST) sensor had a single window instead of several, like the one on the original MiG-27M. A total of 150 were assembled by India. India refers to this model as the MiG-27M Bahadur, while MiG-27L is the Mikoyan export designation.
MiG-27H
This was a 1988 indigenous Indian upgrade of its license-assembled MiG-27L with French avionics, which provides the same level of performance, but with much reduced size and weight. The capabilities of the aircraft are being enhanced by the incorporation of modern avionics systems consisting primarily of two Multi-Function Displays (MFDs) Mission and Display Processor (MDP), Sextant Ring Laser Gyros (RLG INSI), combined GPS/GLONASS navigation, HUD with UFCP, Digital Map Generator (DMG), jam-resistant Secured Communication, stand-by UHF communication, data link and a comprehensive Electronic Warfare (EW) Suite. A mission planning and retrieval facility, VTR and HUD Camera will also be fitte
Mikoyan MiG-27