

Bacalhau à Zé do Pipo
Portuguese Baked Cod Casserole
This Portuguese baked cod casserole features tender salt cod layered with creamy mashed potatoes, savory sautéed onions and olives, topped with golden broiled mayonnaise. The dish offers a comforting blend of flaky fish, smooth purée, and rich, tangy topping with a crisp gratin finish.

History
Bacalhau à Zé do Pipo was created in Porto during the mid-20th century by José Valentim, known as “Zé do Pipo.” It won first prize in a 1960s national gastronomic contest for “The Best Meal at the Best Price.” It remains a beloved comfort dish in Portugal, especially popular in Porto, often served during family gatherings and festive occasions.
- Servings
- 4
- Prep time
- 45 min + 30 min marinating + 24-48 hr desalting
- Cook time
- 50 min (20 min baking + 10 min gratin + 20 min poaching/boiling)
- Total time
- 49 hr 30 min
- Active time
- 45 min
- Resting time
- 30 min marinating + 24-48 hr desalting
- Difficulty
- medium
- Course
- main course
- Cuisine
- Portuguese
- Cooking method
- baking, poaching, sautéing
- Diet
- pescatarian
- Allergens
- fish, egg, dairy
Ingredients
For the cod and marinade:
- 4 salt cod steaks (about 1.5 lb / 680 g), thoroughly desalted
- 1 quart (1 L) whole milk
- 3 garlic cloves, sliced
- 2 bay leaves
- 1/4 cup (60 ml) extra virgin olive oil
For the potato purée:
- 1 1/2 lb (700 g) starchy potatoes (Russet or Yukon Gold), peeled and cubed
- 4 tbsp (60 ml) whole milk
- 3 tbsp (45 g) unsalted butter
- 1 large egg yolk
- Salt and freshly ground black pepper, to taste
For the olive and onion topping:
- 2 medium onions, thinly sliced
- 1 garlic clove, minced
- 3 tbsp (45 ml) extra virgin olive oil
- 1/2 cup (100 g) pitted black olives, roughly chopped
- Salt and freshly ground black pepper, to taste
For assembly and topping:
- 1 cup (200 g) full-fat mayonnaise
- 2 tbsp (15 g) breadcrumbs
Optional garnish:
- Sliced roasted red bell pepper
Preparation
- Desalt the cod by soaking it in cold water for 24 to 48 hours, changing the water every 8 to 12 hours. Drain and pat dry.
- Preheat oven to 350°F (180°C).
- In a saucepan, combine milk, sliced garlic, and bay leaves. Bring to a gentle simmer over medium heat.
- Poach the cod in the simmering milk for about 7 minutes per side until tender and flaky. Remove cod and reserve some poaching liquid.
- Boil the potatoes in salted water until very tender, about 15-20 minutes. Drain well.
- Mash the potatoes until smooth. Warm the milk and butter together until butter melts, then gradually mix into the mashed potatoes.
- Let the potato purée cool to about 140°F (60°C) or less, then stir in the egg yolk. Season with salt and pepper.
- In a skillet, heat olive oil over medium heat. Add sliced onions and sauté until translucent, about 8-10 minutes.
- Add minced garlic and cook for 1 more minute until fragrant.
- Stir in chopped olives and cook for 2-3 minutes. Season with salt and pepper.
- Flake the poached cod into bite-sized pieces, removing any bones or skin.
- In a greased ovenproof baking dish (about 8x12 inches / 20x30 cm), spread the potato purée evenly on the bottom.
- Layer the flaked cod evenly over the purée.
- Spoon the olive and onion mixture evenly over the cod.
- Spread the mayonnaise evenly over the top layer.
- Sprinkle breadcrumbs evenly over the mayonnaise.
- Bake in the preheated oven at 350°F (180°C) for 20 minutes.
- Increase oven temperature to broil (or 400°F / 200°C if no broiler) and broil or bake for an additional 10 minutes until the mayonnaise topping is golden and slightly puffed. Watch carefully to avoid burning.
- Remove from oven and let rest for a few minutes before serving.
- Optionally, garnish with sliced roasted red bell pepper and additional black olives.
Equipment
ovenproof baking dish, saucepan, skillet, mixing bowls
Serving suggestions
Serve hot as a main dish accompanied by a simple green salad or steamed vegetables.
Tips
Use starchy potatoes like Russet or Yukon Gold for a creamy purée. Thoroughly desalting the cod is essential to avoid excessive saltiness. Mayonnaise topping can be broiled or baked until golden. Roasted red pepper slices add color and sweetness as garnish.
Local-language keywords — Portuguese
Bacalhau à Zé do Pipo, azeite extra virgem, maionese integral, bifes de bacalhau, litro de leite integral, dentes de alho, folhas de louro, batatas com amido, Portugal
Keywords — English
Portuguese, cod, baked, mashed potatoes, mayonnaise, olive, comfort food, seafood casserole