Bacalhau à Gomes de Sá (Codfish Casserole Gomes de Sá)
Some recipes belong to restaurants. Others belong to grandmothers. Bacalhau à Gomes de Sá somehow belongs to both.
Created in Porto during the late 1800s by José Luís Gomes de Sá Jr., this dish has become one of Portugal's most beloved bacalhau recipes. It's humble food at its finest. Flaky cod, tender potatoes, sweet onions, good olive oil, and just enough garlic to let everyone know you're eating well.
There are no heavy sauces hiding the ingredients here. Every component has its place, and every bite tastes unmistakably Portuguese. While traditionalists will always reach for salted cod, don't let that stop you if all you can find is fresh or frozen cod. With a little extra attention to removing moisture, you'll still end up with a beautiful dish.

Passport to Portugal
Region: Porto (Northern Portugal)
Category: Main Course
Difficulty: Easy
Serves: 4-6
Best Enjoyed: Family dinners, holidays, or anytime you want Portugal on your dinner table.
Pairs Well With: A simple tomato salad, crusty bread, and a crisp Vinho Verde or Douro white.
Portuguese Word of the Day: Lascas (Large flakes or pieces of fish)
Makes Your Kitchen Smell Like: Sweet onions, garlic, olive oil, and my Grandma's house.
Recipe Snapshot
Prep Time: 30 minutes
Cook Time: 45 minutes
Total Time: About 1½ hours (plus soaking time if using salted cod)
Why You'll Love This Recipe
One of Portugal's most iconic bacalhau dishes.
Simple ingredients with incredible flavor.
Perfect for entertaining.
Naturally gluten-free.
Even better the next day.
Ingredients
1¼ pounds salted cod (500g), soaked and desalinated
Fresh or Frozen Cod Substitution: Use 1¼ pounds (500g) fresh or frozen cod fillets. If frozen, thaw completely. Pat the fish extremely dry with paper towels before cooking. Fresh cod naturally contains more moisture than salted cod, so removing as much water as possible helps preserve the texture of the finished dish.
1¼ to 1½ pounds Yukon Gold potatoes (500-600g)
2 medium onions, thinly sliced into half-moons
2 to 3 garlic cloves, finely minced
⅔ to ¾ cup extra virgin olive oil (150-200ml)
2 bay leaves
2 eggs
Portuguese black olives
Fresh parsley, chopped
Salt and freshly ground black pepper
Whole milk (enough to cover the cod)
Instructions
Step 1: Prepare the Cod
Place the soaked salted cod in a saucepan and cover completely with milk. Let it soak for 1½ to 2 hours. Bring the milk just to a gentle boil. As soon as it begins to simmer, turn off the heat, cover the pan, and allow the cod to gently poach for 15 minutes.
Remove the fish, discard the skin and bones, then break it into large flakes.
Using fresh or frozen cod?
Lightly poach it for 6 to 8 minutes until it flakes easily. Once cooked, spread the fish on paper towels and gently pat it dry again before adding it to the onions. The drier the fish, the better the final texture.
Step 2: Cook the Potatoes
Peel and cut the potatoes into medium slices or large cubes. Cook in lightly salted water until just fork tender. You want them cooked through but still firm enough to hold their shape. Drain well.
Step 3: Boil the Eggs
While everything else cooks, bring a pot of water to a gentle boil. Carefully lower in the eggs. I prefer a soft boil so if you're like me cook for 8 to 8½ minutes. If not, I won't judge, I promise. Just keep the eggs boiling for 10 to 12 minutes.
Immediately transfer them to an ice bath. If soft boiled, the yolks should be just past jammy. Soft, creamy, and perfect for breaking over the hot bacalhau.
Peel and slice just before serving.
Step 4: Make the Cebolada
In a large skillet, heat the olive oil over medium-low heat.
Add:
Onions
Garlic
Bay leaves
Cook slowly for about 15 to 20 minutes.
The onions should become soft, silky, and translucent. Sometimes I'll even caramelize. This step is where the magic happens, so don't rush it.
Step 5: Bring Everything Together
Gently fold the cod into the onions. Add the cooked potatoes.
Season with freshly cracked black pepper and taste before adding salt, as the cod may still provide plenty. Carefully mix everything together without breaking up the potatoes.
Step 6: Bake
Transfer everything to a baking dish. Drizzle with another generous splash of olive oil.
Bake at 375°F (190°C) for 10 to 15 minutes, just until everything is heated through and the flavors have melded together.
Step 7: Finish
Top with:
Soft-boiled egg slices
Portuguese black olives, if you like
Plenty of fresh chopped parsley
One final drizzle of excellent olive oil
Serve immediately.
Tuga Tip
The biggest mistake people make with Bacalhau à Gomes de Sá is leaving too much moisture in the fish or potatoes.
Whether you're using salted cod, fresh cod, or frozen cod, drain everything well. Pat the cod dry, let the potatoes steam off for a few minutes after draining, and don't rush the onions.
Dry ingredients absorb that beautiful olive oil. Wet ingredients just water it down.
Portuguese Myth Buster
Myth: You can only make authentic Bacalhau à Gomes de Sá with salted cod.
Reality: Salted cod gives the dish its traditional flavor and texture, but fresh or frozen cod can still produce an excellent version. The key is removing as much excess moisture as possible before it goes into the pan.
How We Enjoy It in My Portuguese Casa
I like my eggs just a little softer than tradition calls for. Somewhere just past a soft boil, where the yolk is still creamy enough to mingle with the olive oil and coat the potatoes.
Once you break into that first egg, you'll understand why.
Good to Know
Why soak the cod in milk?
The milk gently softens the cod while mellowing its saltiness and enriching the flavor without making it taste creamy.
Can I make this ahead of time?
Absolutely. Assemble everything except the eggs and parsley, refrigerate, and bake just before serving. Add the garnishes at the very end.
What's the best potato?
Outside of Portugal, Yukon Gold is my favorite because it stays creamy while holding its shape. Russets work too, but they're a little more prone to falling apart if overcooked.
One Last Bite
Some dishes tell you exactly where they came from. Bacalhau à Gomes de Sá tastes like Porto. It tastes like Sunday lunch, conversations that last longer than the meal, and recipes that have been passed from one generation to the next.
Good olive oil. Good cod. Good company. Sometimes that's all Portugal needs.
