Our products
Bacalao al Ajillo: Receta Tradicional con Aceite y Ajo - Bacalalo

Garlic Cod: Traditional Recipe with Oil and Garlic

February 22, 2026Maria José Sáez Pastor⏱ 11 min de lectura

Summary: Cod with garlic (bacalao al ajillo) is one of the simplest and most satisfying dishes in Spanish cuisine. With just three main ingredients—extra virgin olive oil, garlic, and quality cod—it creates a dish with an intensity and depth of flavor that belies its apparent simplicity. It is proof that Spanish cuisine at its best does not need complications: it needs exceptional ingredients and the right technique.

This recipe has deep roots in traditional Spanish cuisine. In the bars of central Madrid, in the taverns of Castile, in the pintxos of the Basque Country, "al ajillo" is a classic preparation applied to prawns, mushrooms, chicken, and, most notably, cod. The emulsion formed between the garlic-infused oil and the cod's juices creates a sauce that, if the technique is correct, has a creaminess comparable to that of the finest haute cuisine sauces.

At Bacalalo, we have been selecting the best Gadus morhua cod at Barcelona's Mercat del Ninot since 1990 for recipes like this, where the fish is the sole protagonist. For cod with garlic, thick loins are the ideal choice: they maintain their texture during the process and provide the natural gelatin that is the secret to the sauce. We explain the complete technique, including the trick for a perfectly emulsified sauce.


Contents

Ingredients for 4 people

For the cod:
  • 700 g (1.5 lbs) desalted cod loins (or 900 g / 2 lbs salted cod)
For the garlic sauce:
  • 8-10 cloves of garlic (generous, garlic is key)
  • 150 ml (about 2/3 cup) good quality extra virgin olive oil
  • 2 dried chilies (cayenne) or 1 fresh chili, to taste
  • Plenty of fresh parsley
For the sauce (optional, for emulsifying):
  • 50 ml (about 1/4 cup) dry white wine or Txakoli
  • Pinch of sweet or spicy paprika

Step-by-Step Preparation

Step 1: Desalt and Dry the Cod

If you're starting with salted cod, desalt it in cold water for 36-48 hours, changing the water every 8-12 hours in the refrigerator. For "al ajillo," medium-thick loins (2-2.5 cm / 0.8-1 inch) are perfect.

Once desalted (or if you are using Bacalalo's desalted cod), thoroughly dry each loin with paper towels. This step is critical for "al ajillo": if the cod has surface moisture, the oil will splatter when you add it, and the sauce will not emulsify correctly.

Step 2: Slice the Garlic

Peel all the garlic cloves and slice them thinly and uniformly. Uniformity is important: if there are slices of different thicknesses, the thin ones will burn before the thick ones are ready. You can also use whole cloves crushed with a knife (a more rustic version) or finely chopped garlic (a version more integrated into the sauce).

For traditional cod with garlic, sliced garlic is the most classic presentation and gives the best result in terms of texture and color.

Step 3: Infuse the Oil with Garlic

In a shallow pot or wide, heavy-bottomed pan (a clay pot is perfect for this dish if you have one), heat the oil over medium-low heat. Add the sliced garlic and the chili. The garlic should cook slowly for 5-7 minutes until golden but not burned. Watch constantly: garlic goes from perfectly golden to burned and bitter in seconds.

When the garlic is a pale to light golden color, remove the chili if you don't want the dish to be too spicy, or leave it in if you prefer more heat.

Step 4: Add the Cod

With the oil well infused, raise the heat to medium. Add the cod loins, skin-side up. The oil should sizzle upon contact with the cod: this is a sign that it's at the correct temperature.

Cook for 3-4 minutes without moving the loins, allowing them to lightly brown on the bottom. Then, carefully flip them with a flat spatula.

Step 5: The Trick to the Emulsified Sauce (Pilpil)

This is the secret to cod with garlic and a perfect sauce. Once you've flipped the cod, lower the heat to minimum and begin to gently move the pot in circular motions. The cod will release its natural gelatin, which will emulsify with the oil, forming a thick, shiny sauce, similar to the famous Basque pilpil.

If the oil is too hot, the gelatin breaks down, and the sauce separates. Over very low heat and with constant circular motion, you will have a perfectly emulsified sauce in 5-8 minutes.

If the emulsion doesn't form, you can add a splash of white wine and emulsify with a small whisk off the heat.

Step 6: Finish with Parsley and Paprika

When the sauce is emulsified, generously add the freshly chopped parsley. Parsley is not just for decoration: it provides freshness and a green touch that balances the intense garlic flavor. If desired, sprinkle a pinch of sweet paprika over the loins.

Turn off the heat and let it rest for 2 minutes in the pot.

Step 7: Serve in the Same Pot

Cod with garlic is served in the same pot it was cooked in, especially if it's a clay pot, which retains heat perfectly. Bring it directly to the table and serve the cod with the garlic sauce on top and good bread for dipping.


Expert Tips

The garlic should never burn. Burnt garlic imparts a bitter flavor that permeates everything, and there's no way to fix it. If at any point the garlic starts to turn dark brown, remove it immediately from the oil. Slightly less golden garlic is preferable to burnt garlic.

Oil temperature is everything. For the pilpil to emulsify, the oil must be warm but not hot when you make the circular motions. If the oil is too hot, the emulsion won't form. Remove the pot from the heat for a few seconds before starting to move it.

Generous amount of garlic. Don't be afraid of the garlic: in bacalao al ajillo, garlic is an ingredient, not just a flavoring. Eight to ten cloves for four people might seem like a lot, but cooked in oil over low heat, the garlic mellows considerably and loses its raw aggressiveness.

A clay pot is ideal. Clay pots distribute heat evenly and retain it for a long time after the heat is turned off. They are perfect for "al ajillo," where gentle and even cooking is essential. If you don't have one, a cast-iron skillet is the second-best option.

Chili to taste. Chili is optional but gives the dish that touch of heat that rounds it out. If you don't want it spicy, omit it. If you want it mild, leave it whole without crushing. If you want more intensity, open it and add the seeds.


Related Products from Bacalalo

Cola de Bacalao Desalado sin Espinas (1ud) - 500g

Desalted Cod Tail without Bones (1 unit) - 500g

View product →

Desmigado Extra de Bacalao Desalado - 500g

Extra Shredded Desalted Cod - 500g

View product →

Recipe Variations

Cod with garlic and prawns. Add 8-10 peeled large prawns in the last 3 minutes of cooking. Prawns and cod complement each other perfectly in this "ajillo," and the prawn juices enrich the sauce.

Cod with garlic and cherry tomatoes. Add 12-15 halved cherry tomatoes when the cod has been cooking for 2-3 minutes. The tomatoes add acidity and juiciness that balances the oil and gives the dish a livelier color.

Green cod with garlic (with herbs). Replace part of the parsley with fresh cilantro, basil, or chives. This more aromatic version is perfect for summer and has a freshness that contrasts very well with the cod.


What to Serve With

  • Country bread or crusty bread with a thick crust for dipping in the sauce
  • Steamed potatoes for a more complete version
  • White rice if you want to make the dish a complete meal
  • White wine with acidity: Txakoli, Albariño, or Rueda Verdejo
  • Cava brut nature for a more elegant meal
  • Roasted piquillo peppers as a colorful garnish

Why Cod Quality Matters

Cod with garlic has only three main ingredients: oil, garlic, and cod. With so few elements, the quality of each is crucial. Good quality extra virgin olive oil is the cooking medium and the base of the sauce. Fresh, quality garlic provides the aroma without bitterness. And first-rate Gadus morhua cod has the natural gelatin needed for the pilpil to emulsify, and that deep flavor that makes this simple dish so memorable.

At Bacalalo, we've known this well since 1990 at Barcelona's Mercat del Ninot: with the cod we select, the natural gelatin from the loins makes the difference between a smooth, shiny garlic sauce and a separated oil with garlic. Visit our desalted cod store or come see us at Mercat del Ninot to choose the perfect loins for your "ajillo."


Frequently Asked Questions about Cod with Garlic

Why doesn't the oil in cod with garlic emulsify?

The most common causes are: oil that is too hot when trying to make the pilpil (it should be lukewarm), overly vigorous or incorrect stirring (it should be circular and gentle), or low-quality cod with little natural gelatin. A splash of cold white wine added off the heat while stirring with a whisk usually solves the problem.

How many garlic cloves should be used for cod with garlic?

For 700 g (1.5 lbs) of cod and 4 people, 8-10 medium garlic cloves is the correct amount. It may seem like a lot, but garlic cooked in oil over low heat softens considerably and becomes an integral part of the dish, not just a flavoring.

How long does cod with garlic take to prepare?

With already desalted cod, the complete preparation takes about 25-30 minutes. It's one of the quickest cod dishes to make, although it requires constant attention during cooking.

Can I make cod with garlic without chili?

Of course. Chili is not a mandatory ingredient in "ajillo," although it is traditional. Without chili, the dish is milder and appeals to a wider audience. With chili, it has that characteristic spicy kick that makes it more vibrant.

What is the difference between cod with garlic (bacalao al ajillo) and cod pilpil (bacalao al pilpil)?

Bacalao al pilpil is the Basque version where the oil and cod gelatin create a completely emulsified sauce (with no visible fried garlic). Bacalao al ajillo has sliced and browned garlic as a visible element of the dish, although it can also have some emulsion. The final result of pilpil is creamier and more uniform; that of "ajillo" is more rustic and aromatic.

Can "ajillo" be made with shredded or flaked cod?

Yes, although the result is different. With flaked cod, the dish is more like a cod sofrito than a dish with loins. The cooking time is reduced to 5-7 minutes, and the sauce integrates more with the cod. It's a perfect version for serving on toast or as a filling.

Can cod with garlic be prepared in advance?

"Ajillo" is best freshly made, when the oil is hot and the sauce has just emulsified. It can be reheated over very low heat, but the emulsion tends to separate. If you prepare it in advance, store the cod and oil separately and emulsify the sauce again when reheating.

What type of olive oil is best for "ajillo"?

An extra virgin olive oil with a fruity flavor and low acidity is ideal. You don't need the most expensive oil for cooking (heat reduces the nuances of raw oil), but one of medium-high quality that withstands temperatures well without degrading.

Is cod with garlic a spicy dish?

It depends on the chili: with an unbroken chili, the spiciness is mild and pleasant. With an open chili or several chilies, the spiciness is noticeable. Without chili, it's not spicy at all. Adjust according to your preferences or those of your diners.

How many calories does garlic cod have?

Approximately 380-420 kcal per serving, depending on the amount of oil. It is a dish rich in protein (cod) and healthy fats (olive oil), with a low carbohydrate content.

Can garlic cod be made in an earthenware pot or only in a frying pan?

The earthenware pot is the traditional vessel and the one that gives the best results: it distributes heat evenly and retains it for a long time. However, any frying pan or thick-bottomed pot works well. Avoid very thin frying pans that concentrate heat in specific spots.

What wine pairs best with garlic cod?

Txakoli from the Basque Country is the classic and perfect pairing: its acidity and herbaceous notes complement the garlic and chili pepper, and its low alcohol content does not compete with the cod. Albariño from Galicia is the second excellent option. Avoid tannic or heavily oaked wines that clash with the garlic.


🛒 Products mentioned in this article

Extra Desalted Cod Fillet — 900g

Gadus morhua from Iceland

€44.90

View product →

"Discover Bacalalo" Assortment

The pack for first purchase

€19.90

View product →

View desalted cod →

⭐ 4.9/5 · 24-48h refrigerated shipping · Since 1990 in Mercat del Ninot

Conclusion

Garlic cod demonstrates that the greatness of Spanish cuisine often lies in simplicity: few ingredients, precise technique, and exceptionally high-quality produce. Master the oil temperature, respect the garlic until it's golden but not burnt, and let the cod work its magic with its natural gelatin. The result is a dish that leaves a lasting impression.

To get the cod this recipe deserves, visit Bacalalo, your go-to store in Barcelona's Mercat del Ninot since 1990. We select each Gadus morhua loin so that your garlic cod has that brilliant sauce and deep sea flavor that only the best cod can provide.

Salted cod

Lo que cierra una receta

Salted cod

El detalle que separa un plato de un buen plato.

Ver selección
Maria José Sáez Pastor

Maria José Sáez Pastor

Kitchen & Sea Recipes

Expert in cooking and seafood recipes. Passionate about Mediterranean cuisine, she develops and adapts traditional and creative recipes with cod, anchovies, seafood, and gourmet preserves.

Know our story →
Product listYou can see the products we have in our store.
Surtido "Pulpo & Bacalao" - envase y embalaje premium
Filetes de anchoa del Cantábrico "00" Premium - detalle del producto
Regular priceFrom 38,90 € Unit price77,80 € / kg
Rating: 4.7 out of 5
Cantabrian Anchovies "0" Gourmet Selection
Default Title
Morro Extra de Bacalao Desalado Limpio (2ud) - 500g - detalle del producto
Regular price 24,97 € Sale price25,95 € Unit price49,94 € / kg
Rating: 5.0 out of 5
Extra Clean Desalted Cod Snouts (2 units) - 500g
-4%
30gr
Caviar Beluga Iraní 000 Calidad Premium - detalle del producto
Regular priceOn Sale from 90,00 €
No reviews
Imperial Iranian Beluga Caviar 00
Up to -42%
Default Title
Lomitos de Bacalao Desalado Limpio (2ud) - 500g - detalle del producto
Regular price 21,45 € Sale price22,95 € Unit price42,90 € / kg
Rating: 5.0 out of 5
Cleaned Desalted Cod Loins (2 units) - 500g
-7%

Related articles