Chemistry‹›⌂ 0:00 studied

Module 28 · 12 min read · Free chapter

Heterocycles with two heteroatoms: azoles, diazines and purines

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: rings that run life

In the module "Pericyclic reactions" you met rings with one heteroatom: pyrrole, furan, thiophene and pyridine. Put a second heteroatom into the ring and a new family appears, and it turns out to be one of the most important in chemistry.

The letters of the genetic code, the bases of DNA and RNA, are pyrimidines and purines. The amino acid histidine carries an imidazole ring that moves protons in the active sites of enzymes. Vitamin B₁ has a thiazole ring, caffeine is a purine, and a large share of modern drugs contain one of these rings.

This chapter names the main ring systems, explains their aromaticity and basicity, describes how they react and how they are built, and links them to biology and medicine.

Azoles: structure, aromaticity and basicity

Naming. Five-membered rings with nitrogen plus another heteroatom are azoles.

Ring Heteroatoms (positions) pKa of conjugate acid Example in use
Pyrazole N1, N2 2.5 celecoxib (painkiller)
Imidazole N1, N3 7.0 histidine, metronidazole
Isoxazole O1, N2 about −3 sulfamethoxazole (antibiotic)
Oxazole O1, N3 0.8 oxaprozin (painkiller)
Thiazole S1, N3 2.5 thiamine, sulfathiazole

Aromaticity. Each azole is a flat ring with six π electrons, so it obeys Hückel's 4n + 2 rule (n = 1).

  • One heteroatom is pyrrole-like: N–H, O or S. It gives two electrons from a lone pair to the π system.
  • The other is a pyridine-like nitrogen in a C=N bond. It gives one electron to the π system, and its lone pair points outward in the ring plane.
  • The three remaining carbons give one electron each, for a total of 2 + 1 + 3 = 6.

Basicity. The pyridine-like nitrogen is the basic site, because its lone pair is not part of the aromatic sextet.

  • Imidazole (pKaH 7.0) is more basic than pyridine (5.2). When N3 is protonated, the positive charge is shared equally by both nitrogens through resonance, which stabilises the cation strongly.
  • Pyrazole (2.5) is much weaker, because the two adjacent nitrogens pull electron density from each other.
  • Oxazole (0.8) is weaker than thiazole (2.5), because oxygen is more electronegative than sulfur.

Acidity and tautomerism. The N–H of imidazole is weakly acidic (pKa about 14.5), so imidazole is amphoteric. In unsymmetrically substituted imidazoles and pyrazoles, the N–H proton moves rapidly between the two nitrogens. So 4-methylimidazole and 5-methylimidazole are tautomers that interconvert and cannot be separated. Imidazole also forms strong N–H···N hydrogen bonds, which gives it a high boiling point (256 °C).

Reactions of azoles

Electrophilic substitution. The pyridine-like nitrogen withdraws electrons, so azoles are less reactive than pyrrole. In strong acid they are protonated, which deactivates them further. Still, they undergo nitration, sulfonation and halogenation under suitable conditions.

  • Pyrazole reacts at C4, the carbon farthest from both nitrogens.
  • Imidazole reacts at C4 or C5. Bromination easily goes all the way to 2,4,5-tribromoimidazole.
  • Thiazole reacts at C5, and less readily than thiophene.
  • Oxazole is the least reactive and needs activating groups.

Reactions at nitrogen. The pyridine-like N is nucleophilic. It is alkylated by alkyl halides to give azolium salts and acylated by acyl chlorides. N-Acylimidazoles are reactive acylating agents. Carbonyldiimidazole (CDI) is used to make amides and esters under mild conditions.

The acidic C2–H and carbenes. In imidazolium and thiazolium salts, the C2–H sits between two heteroatoms and is unusually acidic. A base removes it to give an ylide, which can also be written as an N-heterocyclic carbene (NHC).

  • Thiamine (vitamin B₁) uses its thiazolium ylide to attack carbonyl groups and reverse their polarity. This is the biological version of umpolung (Planning a synthesis: retrosynthesis, synthons, umpolung and protecting groups), used for example in decarboxylating pyruvate.
  • Synthetic thiazolium salts catalyse the benzoin condensation and the Stetter reaction in the same way.
  • Stable imidazol-2-ylidenes, first isolated by Anthony Arduengo in 1991, are now widely used as ligands, for example in Grubbs' second-generation metathesis catalyst.

Nucleophilic substitution. A good leaving group at C2 of imidazole or thiazole, between the two heteroatoms, can be displaced by nucleophiles, because C2 is the most electron-poor carbon.

Building azoles and pyrimidines

Most syntheses combine a two- or three-carbon piece carrying carbonyl groups with a piece carrying the heteroatoms. The ring closes by condensation, with loss of water.

Name Pieces Product
Knorr pyrazole synthesis 1,3-dicarbonyl + hydrazine pyrazole
Hantzsch thiazole synthesis α-haloketone + thioamide or thiourea thiazole (2-aminothiazole with thiourea)
Debus–Radziszewski synthesis 1,2-dicarbonyl + aldehyde + 2 NH₃ imidazole
Robinson–Gabriel synthesis 2-acylamino ketone, dehydrated (H₂SO₄ or POCl₃) oxazole
Isoxazole synthesis 1,3-dicarbonyl + hydroxylamine, or nitrile oxide + alkyne isoxazole
Pyrimidine synthesis (Pinner type) 1,3-dicarbonyl + amidine, urea or guanidine pyrimidine
Biginelli reaction aldehyde + β-ketoester + urea, acid 3,4-dihydropyrimidin-2-one
Barbituric acid synthesis diethyl malonate + urea, NaOEt pyrimidine-2,4,6-trione

How to recognise the pieces. Look at the ring and split it at the C–N (or C–S, C–O) bonds next to the heteroatoms, as in retrosynthesis. In a pyrazole, the N–N unit comes from hydrazine, and C3–C4–C5 from a 1,3-dicarbonyl. In a pyrimidine, N1–C2–N3 comes from urea, an amidine or guanidine, and C4–C5–C6 from a 1,3-dicarbonyl.

Example. Acetylacetone (pentane-2,4-dione) and hydrazine give 3,5-dimethylpyrazole. With phenylhydrazine the product is 3,5-dimethyl-1-phenylpyrazole. Chloroacetone and thioacetamide give 2,4-dimethylthiazole.

Barbiturates. Substituting both hydrogens of the CH₂ of diethyl malonate before condensing with urea gives 5,5-disubstituted barbituric acids. Phenobarbital (5-ethyl-5-phenyl) is still used to control epilepsy. Barbituric acid itself is not a sedative, because its CH₂ hydrogens make it too acidic to cross into the brain.

Diazines

The three diazines. Six-membered rings with two nitrogens are pyridazine (1,2), pyrimidine (1,3) and pyrazine (1,4). Each is aromatic like benzene and pyridine, with both nitrogens pyridine-like.

Basicity. A second nitrogen makes the ring much more electron-poor, so diazines are far weaker bases than pyridine (pKaH 5.2).

  • Pyridazine has pKaH 2.3, the highest of the three, because the cation is helped by the repulsion between the adjacent lone pairs being relieved.
  • Pyrimidine has pKaH 1.3.
  • Pyrazine has pKaH 0.6.

Only one nitrogen can be protonated in ordinary acid, because the first positive charge strongly deactivates the second nitrogen.

Reactivity. Diazines are π-deficient.

  • Electrophilic substitution is very difficult. It occurs at C5 of pyrimidine, the position meta to both nitrogens, and only when activating groups such as NH₂ or OH are present. That is why uracil and cytosine can be brominated or nitrated at C5.
  • Nucleophilic substitution is easy at C2, C4 and C6 of pyrimidine, which are ortho or para to the nitrogens. 2- and 4-Chloropyrimidines react with amines and alkoxides much faster than chlorobenzene. Many drugs are built this way.
  • Hydroxypyrimidines exist mainly as the oxo (lactam) tautomers. Uracil is pyrimidine-2,4(1H,3H)-dione, not 2,4-dihydroxypyrimidine. This tautomer choice is what makes the hydrogen-bonding pattern of the DNA bases precise.

Purines. A pyrimidine fused to an imidazole gives purine. Adenine and guanine are purines. Uric acid, the end product of purine breakdown in humans, is a trioxopurine, and its crystals in joints cause gout. Caffeine is 1,3,7-trimethylxanthine.

Biology and medicine

Nucleic acids. DNA uses the pyrimidines cytosine (C) and thymine (T) and the purines adenine (A) and guanine (G). RNA uses uracil (U) instead of thymine. Hydrogen bonds pair them: A with T (or U) by two hydrogen bonds, and G with C by three. That is why DNA rich in G–C pairs melts at a higher temperature.

Histidine and enzymes. With pKaH about 6 to 7, the imidazole of histidine is half protonated near the pH of cells. It can therefore act as both a proton donor and a proton acceptor in the same reaction. That makes it the most common acid–base catalyst in enzyme active sites, as in the catalytic triad of chymotrypsin. Its decarboxylation gives histamine, which causes allergic reactions.

Drugs.

Ring Drug Use
Imidazole (nitro) metronidazole amoebic and anaerobic infections
Benzimidazole omeprazole, albendazole acidity; worm infections
Triazole fluconazole fungal infections
Pyrazole celecoxib arthritis pain
Thiazole (in a fused ring) penicillin (thiazolidine) antibiotic
Pyrimidine 5-fluorouracil, trimethoprim, zidovudine cancer; bacterial infection; HIV
Pyrimidine-trione phenobarbital epilepsy
Purine acyclovir, allopurinol herpes; gout

Indian manufacturers produce many of these drugs, including metronidazole, omeprazole and fluconazole, in large volumes for domestic and export markets.

Worked problems

Problem 1. Imidazole at physiological pH. The pKa of imidazolium is 7.0. What fraction of imidazole is protonated at pH 7.4?

Solution. By the Henderson–Hasselbalch equation, the ratio of base to acid is 107.4−7.0=100.4=2.5110^{7.4 - 7.0} = 10^{0.4} = 2.51.

fraction protonated=11+2.51=0.285\text{fraction protonated} = \frac{1}{1 + 2.51} = 0.285

So about 28% is protonated and 72% is neutral. Both forms are present in useful amounts, which is why imidazole is a good buffer and catalyst near pH 7.

Problem 2. Ranking basicity. Arrange in order of increasing basicity: pyrimidine, pyridine, imidazole, pyrazole.

Solution. Using pKaH values: pyrimidine (1.3) < pyrazole (2.5) < pyridine (5.2) < imidazole (7.0).

Problem 3. Predict the product. What forms from (a) pentane-2,4-dione and hydrazine, (b) chloroacetone and thiourea, and (c) diethyl malonate and urea with sodium ethoxide?

Solution. (a) 3,5-Dimethylpyrazole (Knorr). (b) 2-Amino-4-methylthiazole (Hantzsch). (c) Barbituric acid, pyrimidine-2,4,6(1H,3H,5H)-trione.

Problem 4. π-electron count. Show that thiazole is aromatic and identify its basic nitrogen.

Solution. Thiazole is a flat five-membered ring. Sulfur gives a lone pair (2 electrons), N3 gives 1 electron from its C=N π bond, and the three carbons give 1 each, a total of 6 π electrons (4n + 2 with n = 1). N3 keeps its lone pair in the ring plane, outside the π system, so N3 is the basic site (pKaH 2.5).

Exam lens: why these rings matter

Medicine. More than half of all small-molecule drugs contain at least one nitrogen heterocycle, and azoles and pyrimidines are among the most common. Medicinal chemists like them because they are flat, stable, form hydrogen bonds with proteins and can be decorated at several positions.

Agriculture and materials. Many fungicides (triazoles such as tebuconazole) and herbicides contain these rings. Imidazolium salts are the most common ionic liquids, used as green solvents (Green, supramolecular, nano, medicinal and environmental chemistry). N-Heterocyclic carbenes have changed catalysis.

How NET and JAM test it. Expect questions on π-electron counting and aromaticity, ranking basicity (imidazole > pyridine > pyrazole > pyrimidine), sites of electrophilic and nucleophilic substitution, products of Knorr, Hantzsch, Biginelli and barbiturate syntheses, tautomers of hydroxypyrimidines, base pairing and the role of thiamine and histidine.

Practice: five questions, five angles

These are practice questions written by us, not past papers. Real NET and JAM questions on this topic are shown in the previous year questions panel.

Angle Question Key points to cover
Aromaticity (10 marks) Show that imidazole and thiazole are aromatic and identify the pyrrole-like and pyridine-like atoms in each. Planar ring with 6 π electrons, 4n + 2 with n = 1. Imidazole N1–H gives 2 and N3 gives 1. Thiazole S gives 2 and N3 gives 1. The N3 lone pair lies in the plane and is basic.
Basicity (10 marks) Why is imidazole more basic than pyridine while pyrazole and pyrimidine are much weaker? Find the protonated fraction of imidazole at pH 7.4. The imidazolium charge is shared by two N atoms. In pyrazole the adjacent N withdraws, and in pyrimidine the second N withdraws. pKaH values 7.0, 5.2, 2.5, 1.3. Henderson–Hasselbalch gives 28% at pH 7.4. Histidine as a catalyst.
Synthesis (15 marks) Describe the Knorr, Hantzsch and Debus–Radziszewski syntheses, and the synthesis of barbituric acid and phenobarbital. Knorr: 1,3-dicarbonyl plus hydrazine. Hantzsch: α-haloketone plus thioamide. Debus: glyoxal, aldehyde and NH₃. Barbituric acid from diethyl malonate and urea with NaOEt. Phenobarbital is 5-ethyl-5-phenyl, made by dialkylating malonate first.
Reactivity (10 marks) Compare electrophilic and nucleophilic substitution in azoles and diazines. Explain the acidity of thiazolium C2–H and its role in thiamine. SEAr at pyrazole C4, imidazole C4 or C5, thiazole C5 and pyrimidine C5 (only when activated). SNAr at pyrimidine C2, C4 and C6. C2–H lies between two heteroatoms and gives an ylide or NHC. Thiamine umpolung in pyruvate decarboxylation and benzoin.
Biology (10 marks) Describe the pyrimidine and purine bases of nucleic acids, their tautomers and base pairing, and name four drugs containing two-heteroatom rings. C, T and U are pyrimidines, and A and G are purines. The oxo (lactam) tautomers dominate. A–T has 2 hydrogen bonds and G–C has 3. Drugs: metronidazole, omeprazole, celecoxib, 5-fluorouracil, fluconazole, phenobarbital.

How to use this table: for every heterocycle answer, draw the ring with numbered atoms and mark each lone pair as in-plane or part of the π system before explaining basicity or reactivity.

Quick revision

  • 1,2-Azoles are pyrazole, isoxazole and isothiazole, and 1,3-azoles are imidazole, oxazole and thiazole, all aromatic with 6 π electrons.
  • Each azole has one pyrrole-like heteroatom (2 electrons) and one pyridine-like N (basic, lone pair in plane).
  • pKaH values: imidazole 7.0 > pyridine 5.2 > pyrazole and thiazole 2.5 > oxazole 0.8, and imidazole is amphoteric (N–H pKa 14.5).
  • Electrophiles attack pyrazole C4, imidazole C4 or C5 and thiazole C5, and the C2–H of azolium salts gives ylides and NHCs (thiamine umpolung).
  • Syntheses: Knorr (pyrazole), Hantzsch (thiazole), Debus–Radziszewski (imidazole), Robinson–Gabriel (oxazole), urea or amidine with a 1,3-dicarbonyl (pyrimidine), and Biginelli.
  • Diazine pKaH values are pyridazine 2.3, pyrimidine 1.3 and pyrazine 0.6, with nucleophilic substitution at pyrimidine C2, C4 and C6.
  • C, T and U are pyrimidines and A and G purines, with A–T having 2 hydrogen bonds and G–C 3, and oxo tautomers dominate.

Mains answer practice

Write your answer first, then open the points a good answer should cover.

  1. Name the 1,2- and 1,3-azoles. Show that imidazole and thiazole are aromatic and identify the basic nitrogen in each.

    Show answer points
    • 1,2: pyrazole, isoxazole, isothiazole; 1,3: imidazole, oxazole, thiazole.
    • Planar, 6 π electrons, Hückel 4n + 2 (n = 1).
    • Pyrrole-like atom (N–H, O, S) gives 2 electrons; pyridine-like N gives 1.
    • Three carbons give 1 each: 2 + 1 + 3 = 6.
    • N3 lone pair in ring plane, not in π system: basic site.
  2. Give the positions of electrophilic substitution in pyrazole, imidazole and thiazole. Why is the C2–H of thiazolium salts acidic, and how does thiamine use it?

    Show answer points
    • Azoles less reactive than pyrrole (pyridine-like N withdraws; protonation in acid).
    • Pyrazole C4; imidazole C4/C5 (bromination to 2,4,5-tribromo); thiazole C5.
    • C2–H between two heteroatoms: acidic; base gives ylide/N-heterocyclic carbene.
    • Thiamine ylide adds to carbonyls, reverses polarity (umpolung): pyruvate decarboxylation.
    • Thiazolium catalysts for benzoin and Stetter; Arduengo carbenes as ligands (Grubbs II).
  3. Describe the Knorr pyrazole, Hantzsch thiazole and Debus–Radziszewski imidazole syntheses, and the synthesis of barbituric acid. Predict the products from pentane-2,4-dione + hydrazine and chloroacetone + thiourea.

    Show answer points
    • Knorr: 1,3-dicarbonyl + hydrazine, double condensation; pentane-2,4-dione gives 3,5-dimethylpyrazole.
    • Hantzsch: α-haloketone + thioamide/thiourea; chloroacetone + thiourea gives 2-amino-4-methylthiazole.
    • Debus–Radziszewski: glyoxal + aldehyde + 2 NH₃ → imidazole.
    • Diethyl malonate + urea, NaOEt → barbituric acid; 5,5-dialkylated malonate → phenobarbital.
    • Biginelli: aldehyde + β-ketoester + urea → dihydropyrimidinone.
  4. Compare pyridazine, pyrimidine and pyrazine with pyridine in basicity and reactivity. Why does 2-chloropyrimidine react with amines much faster than chlorobenzene?

    Show answer points
    • pKaH: pyridine 5.2 > pyridazine 2.3 > pyrimidine 1.3 > pyrazine 0.6.
    • Only one N protonated; second N deactivated.
    • π-Deficient: SEAr very hard, only at pyrimidine C5 with NH₂/OH activation.
    • SNAr at C2, C4, C6 (ortho/para to N): Meisenheimer anion stabilised on N.
    • Hydroxypyrimidines exist as oxo (lactam) tautomers: uracil is a 2,4-dione.
  5. Describe the pyrimidine and purine bases of DNA and RNA and their pairing. Name four drugs containing azole or diazine rings and their uses.

    Show answer points
    • Pyrimidines: C, T (DNA), U (RNA); purines: A, G (pyrimidine fused to imidazole).
    • A–T (A–U) two hydrogen bonds; G–C three; G–C-rich DNA melts higher.
    • Oxo tautomers fix the hydrogen-bond pattern.
    • Drugs: metronidazole (nitroimidazole), omeprazole (benzimidazole), celecoxib (pyrazole), fluconazole (triazole), 5-fluorouracil, phenobarbital.
    • Caffeine is 1,3,7-trimethylxanthine; uric acid crystals cause gout (allopurinol).

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

More in this module: Natural products and interdisciplinary chemistry

Official sources

Facts in this chapter were checked against these official sources.

  1. IGNOU MCH-016 Organic Chemistry-II (heterocyclic chemistry)
  2. LibreTexts Organic Chemistry: heterocyclic compounds (azoles, diazines, purines)
  3. NPTEL Heterocyclic Chemistry (IIT)
  4. MIT OpenCourseWare 5.13 Organic Chemistry II (heterocycles)