Bacalhau is Portugal’s much-loved salted cod, and this baked version layers tender fish with potatoes, sweet onions, olive oil, olives, parsley, and hard-boiled eggs. It is savory without being heavy, and soaking the cod ahead gives you control over its saltiness while the oven brings the separate ingredients together.
Ingredients
- 1 lb (450 g) dried salted cod, preferably in thick pieces
- 1½ lb (680 g) Yukon Gold or other waxy potatoes
- 2 medium yellow onions, about 10½ oz (300 g), thinly sliced
- ½ cup (120 ml) extra-virgin olive oil, divided
- 2 cups (480 ml) whole milk, for gently poaching the cod
- 3 garlic cloves (about 9 g), thinly sliced
- 1 bay leaf
- 3 large eggs (about 150 g without shells)
- ⅓ cup (50 g) pitted black olives, such as Portuguese-style cured olives, halved if large
- ¼ cup (15 g) finely chopped fresh flat-leaf parsley, plus a little for serving
- ¼ tsp (1 g) freshly ground black pepper
- Up to ¼ tsp (1.5 g) fine salt, only if needed after tasting the finished mixture
Instructions
- Desalt the cod for 24 hours. Rinse the cod under cold running water to remove loose surface salt. Put it in a large nonreactive bowl, cover generously with cold water, and refrigerate for 24 hours. Change the water every 6 hours, keeping the fish submerged and cold. If the pieces are unusually thick or still taste intensely salty after cooking a small sample, soak them for another 4 to 6 hours, then drain. Salt cod varies, so the extra soak is better than trying to correct an overly salty casserole later.
- Prepare the potatoes and eggs. Drain and rinse the soaked cod. Scrub or peel the potatoes, then cut them into roughly ¾-inch (2 cm) chunks so they cook evenly. Put the potatoes in a saucepan and cover with cold water. Bring to a boil, lower the heat to a steady simmer, and cook for 15 to 20 minutes, until a knife meets slight resistance but the pieces hold their shape. Meanwhile, put the eggs in a second saucepan, cover with water, bring to a boil, then simmer for 9 to 11 minutes. The yolks and whites should be firm. Cool the eggs in cold water, peel, and slice into rounds. Drain the potatoes and set both aside.
- Poach and flake the cod. Put the cod in a wide pan and add the milk and bay leaf. Add a little water if needed so the fish is mostly covered. Bring the liquid just to a gentle simmer; avoid a hard boil, which can break up the fish. Cook for about 8 to 10 minutes, depending on thickness, turning the pieces once if they are not fully submerged. Check the thickest piece with a food thermometer: fish should reach 145°F (63°C), the USDA FSIS safe minimum internal temperature. Lift the cod onto a plate and let it cool enough to handle. Discard the poaching liquid and bay leaf. Remove any skin or pin bones, then separate the fish into large flakes.
- Soften the onions and garlic. Heat the oven to 400°F (200°C). Warm about ⅓ cup (80 ml) of the olive oil in a large skillet over medium-low heat. Add the onions and cook for 12 to 15 minutes, stirring often, until soft, glossy, and lightly golden at the edges. They should become sweet and tender rather than deeply browned. Add the garlic and black pepper and cook for 1 minute. If the pan looks dry, stir in a tablespoon of the remaining oil.
- Combine the casserole. Add the drained potatoes and flaked cod to the skillet, or transfer them to a large bowl if the skillet is crowded. Fold gently with the onion mixture and parsley so the cod stays in visible flakes and the potato pieces do not mash. Taste a small bite before adding any salt; the cod and olives may provide enough. Add salt only if the mixture genuinely needs it. Oil a 2-quart (about 2 L) baking dish with a little of the remaining olive oil, then spoon in the mixture and spread it into an even layer. Drizzle the rest of the oil over the top.
- Bake and finish. Bake uncovered for 20 to 25 minutes, until the edges are bubbling and the top is lightly golden. Arrange the sliced eggs and olives over the casserole during the last 5 minutes of baking, or add them just after it comes out if you prefer the eggs to remain soft and distinct. Scatter with extra parsley and leave the dish to stand for 5 minutes before serving. The brief rest makes it easier to lift portions without crushing the potatoes.
Tips
- Control the salt before cooking. Salted cod is preserved with varying amounts of salt, and thickness affects how quickly it desaltes. Keep it refrigerated while soaking and change the water regularly. If you are unsure, cook and taste a small piece before assembling; do not compensate by salting the whole dish early.
- Keep the potatoes intact. Waxy potatoes such as Yukon Gold or red potatoes hold their shape better than very floury varieties. Simmer them only until barely tender, since they will continue cooking in the oven. If a few edges break, fold gently rather than stirring vigorously.
- Use the oil thoughtfully. Olive oil is a defining flavor in this Portuguese-style dish, but you do not need to pour it all into the skillet at once. Add it in stages and reserve some for the baking dish and top. If you have no extra-virgin olive oil, a mild olive oil works; the flavor will be less fruity.
- Choose a practical cod substitute only when needed. Ready-to-cook, desalted cod can replace salted cod; skip the long soak and season cautiously. Fresh cod also works, but it lacks the concentrated, savory flavor of preserved bacalhau, so add a modest amount of salt after tasting and cook it to 145°F (63°C).
Serving Suggestions
Serve bacalhau warm as a main course, with a simple green salad dressed with olive oil and vinegar to balance the rich fish and potatoes. Steamed green beans, sautéed greens, or lightly dressed cabbage make useful sides without competing with the casserole. Crusty bread is welcome for catching the olive oil and onion juices, though the potatoes already make the dish filling.
For a relaxed meal, bring the baking dish to the table and let everyone take a portion with some egg, olives, and parsley. A little lemon wedge can be offered alongside for anyone who wants a brighter finish; it is optional rather than essential. Because the cod and olives are already savory, keep accompanying sauces and side dishes lightly seasoned.
Variations
There are many regional and family versions of bacalhau in Portugal; this potato-and-onion bake is a home-style approach rather than a claim to a single definitive formula. Some cooks use more olive oil, leave the potatoes in thicker slices, or add the eggs only as a garnish. You can follow those preferences while keeping the soaking, gentle fish cooking, and final oven bake the same.
For a more substantial casserole, add 1 cup (150 g) cooked chickpeas when folding in the potatoes. They make the dish heartier and absorb some of the onion and olive oil flavor. For a greener variation, fold in 2 cups (60 g) baby spinach just before transferring the mixture to the baking dish; it will wilt as the casserole bakes. Both additions change the traditional balance, so keep them modest.
If black Portuguese olives are unavailable, use pitted Kalamata olives. They are usually more assertive and tangy, so start with a slightly smaller amount and add more at the table. Parsley can be replaced with 2 tablespoons (6 g) chopped cilantro for a different herbal note, although parsley is the more familiar choice for this style. Avoid replacing the cod with smoked fish unless you want a noticeably smoky and saltier result.
Storage and Reheating
Refrigerate leftovers within 2 hours of cooking, in a covered container or tightly covered baking dish. They keep for 3 to 4 days in the refrigerator. For easier reheating, divide the casserole into portions once it has cooled; avoid leaving it at room temperature while people serve themselves for an extended period.
Reheat a portion covered in a 325°F (165°C) oven until hot throughout, usually 15 to 25 minutes depending on its depth. Add a teaspoon of water or olive oil if the potatoes seem dry, and uncover for the final few minutes if you want the top to crisp again. A microwave also works: cover loosely, heat in short intervals, and turn or stir carefully so the center heats evenly. Leftovers should reach 165°F (74°C) when checked with a food thermometer. You can freeze portions for up to 2 months, though potatoes may soften after thawing; thaw overnight in the refrigerator and reheat thoroughly.
Frequently Asked Questions
How long should salted cod soak?
For the pieces used here, start with 24 hours in the refrigerator, changing the cold water every 6 hours. Thick pieces may need longer. Salt levels and thickness differ between suppliers, so cook a small sample to check the seasoning before you build the casserole. Keep the fish chilled throughout the soak.
Can I make this with cod that is already desalted?
Yes. Buy ready-to-cook desalted salt cod and skip the 24-hour soak, following the package’s storage directions. Rinse it, then proceed with the milk poaching step and check that the thickest piece reaches 145°F (63°C). Taste before adding salt, because some desalted products still retain a good amount.
Can I use fresh cod instead of bacalhau?
Yes, but the flavor will be milder and less characteristic because fresh cod has not been salt-cured. Gently poach it in the milk until it reaches 145°F (63°C), flake it, and season the potato mixture only after tasting. Do not add salt by the same assumption you would use for an unsalted potato casserole.
Why did my casserole turn out too salty?
The cod may not have soaked long enough, or the olives and cod together may have contributed more salt than expected. Next time, extend the refrigerated soak and test a cooked sample before assembling. Do not add salt until the mixture is combined. If the finished dish is already salty, serve it with unsalted greens, bread, or potatoes rather than adding more salty toppings.
Can I prepare bacalhau ahead?
You can soak the cod a day ahead and keep it refrigerated, changing the water on schedule. You can also boil the potatoes and eggs earlier in the day, cool them promptly, and refrigerate them separately. For the best texture, combine and bake the casserole close to serving time; an assembled dish can be refrigerated, but it may need extra time in the oven to heat through.
Related
- Caramelised Potatoes: A Danish Christmas Side Dish
- Caramelized Butter Potatoes with Crispy, Golden Edges
- Crispy Duck Skin on Confit Legs: The Best Method
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).