Porto Salted Cod: Bacalhau à Gomes de Sá

Updated November 4, 2026

Total time
25 hr 30 min
prep 24 hr 25 min · cook 1 hr 5 min
Serves
4
portions as written
Safe temperature (USDA)
145°F / 63°C
check the thickest piece

Jump to recipe

Porto Salted Cod: Bacalhau à Gomes de Sá

Bacalhau à Gomes de Sá is a beloved Porto-style salted cod casserole layered with potatoes, slowly softened onions, olive oil, hard-boiled eggs, and olives. The cod is desalinated, gently poached in milk, then baked with the vegetables until the flavors come together in a comforting dish made for sharing.

Ingredients

  • 1½ lb (680 g) boneless salt cod, preferably in thick pieces
  • 2 cups (475 ml) whole milk, for poaching the cod
  • 1¾ lb (800 g) waxy potatoes, such as Yukon Gold, peeled if desired
  • 2 large yellow onions, about 1 lb (450 g), thinly sliced
  • ⅓ cup (80 ml) extra-virgin olive oil, plus a little for greasing the baking dish
  • 3 garlic cloves (about 9 g), finely chopped
  • 1 bay leaf
  • 3 large eggs
  • ½ cup (75 g) pitted black olives, whole or halved
  • ¼ cup (15 g) chopped flat-leaf parsley, plus a little to garnish
  • ¼ teaspoon (1 g) freshly ground black pepper, or to taste
  • Fine salt, only if needed after tasting; the cod may still contribute salt

Instructions

  1. Desalt the cod. Rinse the salt cod under cold running water to remove surface salt, then place it in a large nonreactive bowl and cover it generously with cold water. Refrigerate for 24 hours, changing the water about every 6 to 8 hours. Keep the fish cold throughout; do not desalinate it on the counter. Cod pieces vary in thickness and saltiness, so taste a small cooked flake before using it. If it remains unpleasantly salty, give it another few hours in fresh water. The timing below assumes moderately thick pieces that are ready after 24 hours.
  2. Get the oven and eggs ready. Heat the oven to 375°F (190°C) and lightly oil a medium baking dish, about 9 by 13 inches (23 by 33 cm). Put the eggs in a small saucepan, cover with water, bring to a boil, then lower the heat and simmer for 9 to 10 minutes. Drain and cool them in cold water. Peel once cool; the yolks and whites should be firm. Slice the eggs just before assembling.
  3. Cook the potatoes. Cut the potatoes into roughly ½-inch (1.3 cm) rounds. Put them in a saucepan, cover with cold water, and bring to a boil. Simmer for 12 to 18 minutes, depending on their size, until a knife meets little resistance but the slices still hold their shape. Drain carefully. Avoid cooking them until they crumble, since they will spend more time in the oven.
  4. Poach and flake the cod. Drain the desalted fish and place it in a wide saucepan with the milk and bay leaf. Add a splash of water if needed so the pieces are mostly covered. Bring the milk just to a gentle simmer, then cook for about 8 to 12 minutes, turning thick pieces once, until the fish flakes easily. Check the thickest piece with a food thermometer: USDA FSIS guidance sets 145°F (63°C) as the safe minimum internal temperature for fish. Lift out the cod, discard skin and any bones, and break it into large flakes. Reserve about ¼ cup (60 ml) of the poaching milk; discard the rest or save it for another use.
  5. Soften the onions. While the cod poaches or the potatoes cook, warm the olive oil in a large skillet over medium-low heat. Add the sliced onions and cook for 15 to 18 minutes, stirring often, until soft, glossy, and lightly golden at the edges. They should become sweet and tender rather than browned and crisp. Stir in the garlic and black pepper for the final minute. Taste a little onion before adding any salt, because the cod will season the casserole.
  6. Layer the casserole. Arrange about half the potatoes in the baking dish. Scatter over half the onion mixture, then add the flaked cod. Finish with the remaining potatoes and onions. Spoon the reserved poaching milk over the layers to keep them moist, using up to ¼ cup (60 ml); add a little more only if the casserole looks dry. Bake uncovered for 20 to 25 minutes, until hot throughout and gently bubbling at the edges. Check that the fish in the center reaches 145°F (63°C) if it has cooled substantially before baking.
  7. Garnish and serve. Arrange the sliced eggs and olives over the hot casserole, scatter with parsley, and let it stand for about 5 minutes so the layers settle. Taste a potato or onion before seasoning at the table. Serve warm, lifting portions gently so each plate gets cod, potatoes, onions, egg, and olives.

Tips

  • Choose the right cod. Salt cod is sold dried and salted, often in pieces or fillets. If you can buy it already desalinated, follow the package directions and skip the 24-hour soak; this shortens the total time considerably. Fresh cod is not a direct substitute for the salted fish: it will be milder and less firm, so season carefully and expect a less traditional flavor.
  • Desalt by thickness, not by guesswork. A thin piece can lose salt faster than a thick center-cut piece. Keep the bowl refrigerated, change the water regularly, and taste a small cooked flake before assembling. If using especially thick or very salty cod, it may need 36 hours or longer, with continued water changes.
  • Keep the onions gentle. Low, steady heat gives the onions time to soften without scorching the garlic or making the dish oily. If the pan starts to brown too quickly, lower the heat and add a teaspoon of water. Use a moderate hand with extra salt; the cod and olives both add seasoning.
  • Use a firm potato and avoid overmixing. Waxy potatoes keep their shape better than very floury varieties. Layer the pieces rather than stirring everything together, and handle the cod in generous flakes so the finished bake has distinct, tender components.

Serving Suggestions

Serve the casserole straight from its baking dish while it is warm, with a simple green salad dressed with olive oil and vinegar to balance the richness. Steamed green beans, sautéed greens, or lightly dressed cabbage also work well. A crusty loaf is useful for the savory olive-oil and onion juices, although the potatoes make the meal substantial on their own.

For a relaxed meal, bring the eggs and olives to the table as part of the casserole rather than arranging every portion separately. If you are serving a larger spread, offer smaller squares alongside soup or vegetables. The flavors are pronounced but not spicy, so a bowl of extra olives and chopped parsley lets guests adjust their plates without changing the bake.

Variations

Porto and family versions of bacalhau à Gomes de Sá can differ in how the potatoes are cut, how much milk is used, and whether the cod is baked in larger pieces or broken into flakes. This version keeps the layers recognizable and uses a little of the poaching milk for moisture. For a richer result, some cooks use more olive oil; add it gradually rather than pouring in a large amount at once.

If black salt-cured olives are difficult to find, use pitted Kalamata olives. They bring a fruitier, sharper taste and may be saltier, so rinse them briefly and be especially cautious with added salt. Flat-leaf parsley is the usual fresh herb here; a small amount of chopped cilantro can be used if preferred, though it gives the dish a different herbal note. For a dairy-free version, poach the cod gently in water with a bay leaf and use that cooking liquid to moisten the layers. The result will be less rounded and milky, but the potatoes, onions, and olive oil still make a satisfying casserole.

For a less traditional shortcut, ready-to-use desalted cod saves the soaking time. Check its label and taste a cooked flake before seasoning, since products vary. Do not substitute unsalted fresh fish without adjusting expectations: the characteristic savory depth of this Porto dish comes in part from salted cod, and fresh fish will not reproduce it exactly.

Storage and Reheating

Refrigerate leftovers within 2 hours of cooking, in a shallow airtight container or covered baking dish. They keep for 3 to 4 days in the refrigerator. The potatoes may soften and the eggs can become a little firmer after storage, but the flavors remain pleasant. For best texture, store portions rather than repeatedly reheating the entire casserole.

Reheat individual portions covered in a 325°F (165°C) oven until steaming hot, or use a microwave in short intervals, turning or stirring where practical. Check leftovers with a food thermometer and reheat them to 165°F (74°C). Add a teaspoon or two of water or milk before reheating if the fish and potatoes look dry. Avoid warming the casserole for a long time at high heat, which can dry out the cod. Freeze leftovers in airtight portions for up to 2 months for best quality; thaw overnight in the refrigerator and reheat to 165°F (74°C).

Frequently Asked Questions

How long should I soak salt cod?

For the moderately thick pieces in this recipe, start with 24 hours in the refrigerator and change the water every 6 to 8 hours. Very thick or heavily salted pieces may need 36 hours or more. The most reliable check is to cook and taste a small flake; continue soaking in fresh cold water if it is still too salty.

Can I prepare the cod ahead of time?

Yes. Desalt it in the refrigerator, then poach and flake it up to a day before assembling. Refrigerate the cooked cod promptly in a covered container. You can also cook the potatoes and onions ahead, but keep the components chilled and assemble shortly before baking for the best texture.

Can I use fresh cod instead of salt cod?

You can make a similar potato-and-fish bake with fresh cod, but it will not have the same salty, concentrated flavor or the familiar character of bacalhau à Gomes de Sá. Do not soak fresh cod. Cook it to 145°F (63°C), taste before adding salt, and consider adding a few extra olives for savory contrast.

Why is my casserole too salty?

The cod may not have been desalted long enough, or the olives may have added more salt than expected. Before baking, taste a small piece of cod and a potato together. If the cod is still too salty, soak it longer in fresh refrigerated water; if the casserole is already assembled, serve it with unsalted vegetables or bread rather than adding more salty garnishes.

Do I have to use milk to poach the cod?

No. Water with a bay leaf works if you avoid dairy, and the fish will still poach gently. Milk gives the cod a softer, rounder flavor and is part of a familiar preparation for this dish. If you use water, reserve a little of that liquid to moisten the casserole, or use a small splash of unsalted stock.

Related

More recipes to cook

Safety notes: safe minimum internal temperatures from USDA FSIS; raw and undercooked fish guidance from the U.S. FDA. Food safety notes

Spotted an error? Tell us and we will correct it (corrections policy).