Ham, Spinach and Pasta Gratin

1/2 pound fusilli or other dried pasta

2 1/2 cups grated Gruyere cheese (about 1/2 pound)

1 pound cooked ham, chopped fine (preferably in a food processor, about 3 cups)

1 onion, chopped fine

3 garlic cloves, minced

1 1/2 tablespoons unsalted butter

2 (10-ounce) packages frozen chopped spinach, cooked, drained, and squeezed dry

1/4 teaspoon freshly grated nutmeg, or to taste

5 large eggs

3 cups milk

1 1/4 cups fresh rye bread crumbs

In a pot of salted boiling water boil the pasta until it is al dente, drain it well, and spread it in a greased 2-quart flameproof shallow baking dish. Sprinkle the pasta with 1/2 cups of the Gruyere, top the Gruyere with the ham, spreading it evenly, and sprinkle the ham with 1 cup of the remaining Gruyere. In a heavy skillet cook the onion and the garlic in the butter over moderately low heat, stirring, until the onion is softened, add the spinach, the nutmeg, and salt and pepper to taste, and cook the mixture over moderate heat, stirring, for 1 to 2 minutes, or until the excess liquid is evaporated. Top the ham layer with the spinach mixture.

In a bowl whisk together the eggs, the milk, and salt and pepper to taste, pour the custard slowly over the spinach mixture, and bake the gratin, covered with foil, in the middle of a preheated 400 degree oven for 50 minutes, or until the custard is set. Discard the foil, in a small bowl toss together the remaining 1 cup Gruyere and the bread crumbs, and sprinkle the topping evenly over the custard. Broil the grain under a preheated broiler about 4 inches from the heat for 1 to 2 minutes, or until the cheese is melted and the bread crumbs are golden brown. Serves 6 to 8.