We all wait for what seems like a lifetime, and then tomatoes ripen at once.

Not that I'm complaining, but the clock does starts ticking the minute a tomato is picked. You have to use it immediately or it will go south quickly, and a wasted tomato seems like a crime against nature. So when I was staring down several pounds of the summer beauties, I decided a tomato gratin was on my menu.

When we think about gratins, what typically comes to mind is a baking dish of sliced potatoes, layered with cream and cheese, and topped with a crispy crust. But a gratin isn't defined by the vegetable, the cream or even the cheese. It's defined by the shallow dish it's cooked in (aptly named a gratin dish) and that crispy crust.

That leaves loads of room to turn almost anything into a gratin. This week I've decided to push the envelope on the classic side and make a hearty, deeply flavorful main dish version with tomatoes, toasted bread cubes, kalamata olives and eggs.

A good tomato is juicy, and while we want this gratin to be moist, we don't want it to be watery, so we sauté the tomatoes, along with a generous dose of garlic, to allow them to cook down a bit and release their juices. Browned bread cubes are added into the simmered tomatoes, to soak up all that good juice, and the mixture is poured into either one large gratin dish or 4 individual gratin dishes.

After the gratin bakes for a bit, eggs are cracked over the top and feta cheese and more bread cubes are scattered around the eggs before the dish is popped back in the oven and baked just long enough for the eggs to begin to set and a crusty top to form around them.

The gratin then sits, tented with foil, for a few minutes, which allows the eggs to finish cooking, without overcooking.

I garnish with a lavish showering of fresh basil and toasted pine nuts, giving the dish a luxurious taste and look. This is a fitting meal that highlights the best of summer's bounty.

Meredith Deeds is a cookbook author and food writer from Edina. Reach her at meredithdeeds@gmail.com. Follow her on Instagram ­at @meredithdeeds.

Mediterranean Tomato and Egg Gratin

Serves 4.

Note: Perfectly ripe tomatoes give this hearty, main dish gratin its big summer flavor. From Meredith Deeds.

• 5 tbsp. extra-virgin olive oil, divided

• 4 c. cubed (3/4-in.) French baguette

• 4 garlic cloves, finely chopped

• 1/4 tsp. red pepper flakes

• 6 medium tomatoes (about 3 lbs.), cored and cut into 3/4-in. pieces (6 c.)

• 3/4 tsp. salt, divided

• 1/2 tsp. pepper

• 1/2 c. kalamata olives, pitted and halved

• 4 eggs

• 1/2 c. crumbled feta cheese

• 3 tbsp. toasted pine nuts

• 3 tbsp. roughly chopped or torn fresh basil leaves

Directions

Butter a 3-quart shallow baking dish, or 4 (12-ounce) shallow baking dishes. Adjust oven rack to middle position and heat oven to 425 degrees. Heat 3 tablespoons oil in a large skillet over medium heat. Add bread and stir to coat. Cook, stirring constantly, until bread is browned and toasted, about 5 minutes. Transfer bread to a large plate.

Return skillet to medium heat and add remaining 2 tablespoons oil, garlic and red pepper flakes. Cook, stirring constantly, for 30 seconds or until fragrant. Add tomatoes, 1/2 teaspoon salt and black pepper, and stir to combine and cook, stirring occasionally, until tomatoes have started to break down and have released their juices, about 5 to 8 minutes. Stir in the olives.

Remove skillet from heat and gently stir in 3 cups of the toasted bread cubes. Transfer the mixture into the prepared baking dish or dishes. Bake until the liquid is thickened, about 5 to 8 minutes.

Roughly chop the remaining 1 cup bread cubes. Using a spoon, make 4 indentations, large enough to hold an egg, in tomato mixture. Crack an egg into each hole. Season eggs with remaining 1/4 teaspoon salt. Sprinkle the chopped bread cubes and feta around the eggs.

Return skillet to the oven and bake until whites are just beginning to set but still slightly jiggly, about 8 to 10 minutes. Remove from the oven, loosely tent with aluminum foil and let sit for 2 to 3 minutes, until whites are just set. Garnish with basil and pine nuts and serve.

Nutrition information per serving:

Calories500Fat34 g

Sodium1,080 mgCarbohydrates35 g

Saturated fat7 gAdded sugars0 g

Protein17 gCholesterol205 mg

Dietary fiber5 g

Exchanges per serving: 1 vegetable, 1 starch, 1 carb, 2 medium-fat protein, 4 ½ fat.