Asafoetida /æsəˈfiːtɪdə/ is the dried latex (gum oleoresin) exuded from the rhizome or tap root of several species of Ferula, a perennial herb that grows 1 to 1.5 m (3.3 to 4.9 ft) tall. It is part of the celery family Apiaceae. The species is native to the deserts of Iran and mountains of Afghanistan, but is mainly cultivated in nearby India. Asafoetida has a pungent smell but in cooked dishes, it delivers a smooth flavour reminiscent of leeks.

It is also known as food of the gods, jowani badian, hing, hengu, ingu, kayam, and ting. Asafoetida is thought to be in the same genus as silphium, a plant now believed to be extinct, and was used as a cheaper substitute for that historically important herb.

This spice is used as a digestive aid, in food as a condiment, and in pickling. It plays a critical flavoring role in Indian vegetarian cuisine by acting as an umami enhancer. Used along with turmeric, it is a standard component of lentil curries such as dal, sambar as well as in numerous vegetable dishes, especially those based on potato and cauliflower. Kashmiri cuisine also uses it in lamb/mutton dishes such as Rogan Josh It is sometimes used to harmonize sweet, sour, salty, and spicy components in food. The spice is added to the food at the time of tempering. Sometimes dried and ground asafoetida (in very small quantities) can be mixed with salt and eaten with raw salad.

In its pure form, it is sold in the form of chunks of resin, small quantities of which are scraped off for use. The odor of the pure resin is so strong that the pungent smell will contaminate other spices stored nearby if it is not stored in an airtight container. Many commercial preparations of asafoetida use the resin ground up and mixed with a larger volume of other neutral ingredients, such as gum arabic, wheat flour, rice flour and turmeric. The mixture is sold in sealed plastic containers with a hole that allows direct dusting of the powder. Asafetida odour and flavour become much milder and much less pungent upon heating in oil or ghee. Sometimes, it is fried along with sautéed onion and garlic.

Asafoetida is considered a digestive in that it reduces flatulence. It is, however, one of the five pungent spices generally avoided by Buddhist vegetarians.

It was familiar in the early Mediterranean, having come by land across Iran. Though it is generally forgotten now in Europe, it is still widely used in India. It emerged into Europe from a conquering expedition of Alexander the Great, who, after returning from a trip to northeastern ancient Persia, thought they had found a plant almost identical to the famed silphium of Cyrene in North Africa—though less tasty. Dioscorides, in the first century, wrote, "the Cyrenaic kind, even if one just tastes it, at once arouses a humour throughout the body and has a very healthy aroma, so that it is not noticed on the breath, or only a little; but the Median is weaker in power and has a nastier smell." Nevertheless, it could be substituted for silphium in cooking, which was fortunate, because a few decades after Dioscorides' time, the true silphium of Cyrene became extinct, and asafoetida became more popular amongst physicians, as well as cooks.

Asafoetida is also mentioned numerous times in Jewish literature, such as the Mishnah. Maimonides also writes in the Mishneh Torah "In the rainy season, one should eat warm food with much spice, but a limited amount of mustard and asafoetida."

Asafoetida was described by a number of Arab and Islamic scientists and pharmacists. Avicenna discussed the effects of asafoetida on digestion. Ibn al-Baitar and Fakhr al-Din al-Razi described some positive medicinal effects on the respiratory system.

After the Roman Empire fell, until the 16th century, asafoetida was rare in Europe, and if ever encountered, it was viewed as a medicine. "If used in cookery, it would ruin every dish because of its dreadful smell" asserted Garcia de Orta's European guest. "Nonsense," Garcia replied, "nothing is more widely used in every part of India, both in medicine and in cookery. All the Hindus to add to their food." During the Italian Renaissance, asafoetida was used as part of the exorcism ritual.

The resin-like gum comes from the dried sap extracted from the stem and roots and is used as a spice. The resin is greyish-white when fresh, but dries to a dark amber colour. The asafoetida resin is difficult to grate and is traditionally crushed between stones or with a hammer. Today, the most commonly available form is compounded asafoetida, a fine powder containing 30% asafoetida resin, along with rice flour or maida (wheat flour) and gum arabic.

Ferula assafoetida is a monoecious, herbaceous, perennial plant of the family Apiaceae. It grows to 2 m (6.6 ft) high, with a circular mass of 30–40 cm (12–16 in) leaves. Stem leaves have wide sheathing petioles. Flowering stems are 2.5–3 m (8.2–9.8 ft) high and 10 cm (3.9 in) thick and hollow, with a number of schizogenous ducts in the cortex containing the resinous gum. Flowers are pale greenish yellow produced in large compound umbels. Fruits are oval, flat, thin, reddish brown and have a milky juice. Roots are thick, massive, and pulpy. They yield a resin similar to that of the stems. All parts of the plant have the distinctive fetid smell.

Typical asafoetida contains about 40–64% resin, 25% endogeneous gum, 10–17% volatile oil, and 1.5–10% ash. The resin portion is known to contain asaresinotannols 'A' and 'B', ferulic acid, umbelliferone and four unidentified compounds.

The English name is derived from asa, a Latinized form of Farsi azā, meaning "resin", and Latin foetidus meaning "smelling, fetid", which refers to its strong sulfurous odour. In the U.S., the folk spelling and pronunciation is "asafedity". It is called हिंग (hinga) in Marathi, हींग "(hīng)" in Hindi, ହେଙ୍ଗୁ "(hengu)" in Odiya, হিং "(hiṅ)" in Bengali, ಇಂಗು (ingu) in Kannada, കായം (kāyaṃ) in Malayalam, ఇంగువ (inguva) in Telugu and பெருங்காயம் (perunkayam) in Tamil . In Pashto it is called, هنجاڼه "(hënjâṇa)". In 14th century Malayalam it is called 'Raamadom" and are sold by special Traders called "Raamador.' Its pungent odour has resulted in its being known by many unpleasant names; In French it is known (among other names) as merde du Diable, meaning "Devil's faeces", in English it is sometimes called Devil's dung, and equivalent names can be found in most Germanic languages (e.g. German Teufelsdreck, Swedish dyvelsträck, Dutch duivelsdrek and Afrikaans duiwelsdrek). Also, in Finnish it is called pirunpaska or pirunpihka, in Turkish it is known as Şeytan tersi, Şeytan boku or Şeytan otu and in Kashubian it is called czarcé łajno.