Described by chef Simon Hopkinson as “a classic amongst tarts”, this deliciously sweet recipe from Alsace-Lorraine is somewhere between a quiche and a flammkuchen, a tangle of buttery, slow-cooked onions barely held together by a rich egg custard. When I first came across it, in an Alsatian restaurant perched rather incongruously on the side of an Alp, I thought an onion tart sounded rather dull. I’m not too proud to admit I was wrong: thanks to the alchemy that occurs when this most common, yet least lauded of vegetables is given time to fulfil its potential in the flavour department, this is a dish that’s far more than the sum of its parts.

Though it’s by no means the only onion pastry in the French repertoire – Provençal pissaladière and Flemish flamiche spring to mind, but there are no doubt others – it’s my new favourite. More summery than Lancashire butter pie and less antisocial than pickled onion Space Raiders, this is a great, vegetarian-friendly centrepiece for a spring lunch, though, frankly, I’d snap it up at just about any time of day, or indeed year.

The onions

Such tarts always seem to be made with ordinary brown onions, rather than the milder white or sweeter red sort, but success depends to a large extent on how these are prepared, as I find to my cost when two fall apart in a watery mess under the knife. Though the methods are different, the fault, I decide, is the same for both: the onions are too wet. To be fair to Jane Grigson, her original recipe, included in her Vegetable Book, suggests frying the onions in lard – but, she cautions, because it’s “rich and filling, it’s best eaten at midday if there is a tender stomach in the family”. One “way out is to blanch the onions in water for seven to 10 minutes until they soften”. I can’t resist giving it a try, and, perhaps predictably, it’s a disaster: though I drain them well, they leak moisture into the filling, and prove sadly bland, which Grigson charitably describes as “a paler taste”.

Jane Grigson suggests blanching onions in water for seven minutes, which is a disaster. Thumbnails by Felicity Cloake.

The other recipe, from Gilles Pudlowski’s Alsace Tradition, fries the onions for just three minutes, which does wilt them, but certainly doesn’t soften them to anything near the satiny ribbons I end up with after an hour of patient evaporation on the stove for Simon Hopkinson’s recipe. As ever with onions, patience will be rewarded; with enough butter, they don’t need more than the occasional stir, but the flavour, as well as the texture, is well worth the effort; deep and almost winey.

That said, I also like Pudlowski’s idea of adding a glass of the local white for a little extra acidity – just make sure you reduce it completely, because sprinkling a little flour over the top doesn’t seem to do the trick for me, (Although any dry white will do, if you use riesling or pinot gris, the rest of the bottle would be a good pairing at the table).

Hopkinson and Rowley Leigh cook the onions in butter, Elizabeth David butter, bacon fat or beef dripping, and, as we’ve seen, Grigson recommends lard and Pudlowski olive oil. As long as you don’t skimp on whatever you go for, it’s largely a matter of taste, though I think that good beef dripping goes particularly well with onion.

Grigson chops her onions, but we all prefer them in thin slices; not only is this much easier, especially if you own a mandoline (and you really ought to – they’re cheap and will pay you back in dauphinois), but the slightly stringy texture is much more pleasing, almost like sweet noodles. That said, it does make the tart difficult to cut neatly, so if presentation is important to you, consider chopping them instead.

Gilles Pudlowski adds a glass of the local white for extra acidity.

The filling

What really sets the various recipes apart, however, is their approach to fillings. At one end of the texture spectrum is Elizabeth David’s in French Country Cooking, glued together with just eggs and grated gruyère, which proves completely delicious, but more of a cheese and onion tart than vice-versa.

At the other is Hopkinson’s, well summed up by his introductory comment: “My idea of the perfect onion tart is one from which the filling oozes out when you cut into it.” He achieves this effect with 300ml double cream and four egg yolks – and, indeed, it runs like rich lava at the merest brush of the knife. Needless to say, it proves extremely popular with my testers, and I’d highly recommend giving it a try, but the results are not quite as I recall the onion tarts I’ve known and loved in eastern France, which tend to be more solid and eggy than this savoury custard tart.

Simon Hopkinson’s version is amazingly gooey, achieved with double cream and four egg yolks.

Rowley Leigh’s version in A Long and Messy Business, with a mixture of egg yolks and whole egg, and double cream and milk, comes closer, and Grigson’s, as far as I can tell given the unfortunate incident with the blanched onions, closer still with her single cream and whole eggs – the whites seem to give the filling structure, while a generous dash of cream tames the intensity of the onions.

The pastry

Shortcrust is mandatory here – almost. Pudlowski uses a slightly different pastry, made using melted butter, that’s so soft, it’s more spreadable than rollable. Not only is it far less faff to make, but it proves crisper and flakier than ordinary shortcrust, and a pleasant contrast with the rich filling. Make sure you blind bake it, though; damp pastry may be OK with David, but I’m not particularly keen.

Rowley Leigh’s onion tart: a ‘long and messy business’.

Extras and seasonings

Hopkinson says his mother used to make a “jolly good cheese and onion tart” with Lancashire, and admits he sometimes adds thyme, sage, chopped bacon or anchovies, but “I prefer the purity of onions alone”. Again, make your choice; cheese is delicious, but I think a small amount of bacon complements the vegetable without overshadowing it, especially if you fry the onion in its rendered fat. Either, or… or neither: up to you.

Whichever way you go, I would, however, strongly counsel adding an energetic grating of nutmeg; don’t be shy, this dish can take it.

Perfect onion tart

Serve warm, rather than hot or cold, preferably with a green salad and a glass of riesling on the side.

Prep 30 min

Cook 2 hr

Serves 6

100g butter, lard or dripping

80g chunky bacon lardons, smoked or unsmoked, to taste (optional)

1kg onions, peeled and finely sliced

Salt and pepper

75ml dry white wine

4 eggs

100ml whipping cream

Nutmeg, to grate

For the pastry

145g butter

3 tbsp water

250g plain flour

½ tsp fine salt

Over a medium heat, melt the fat for the filling in a large frying pan for which you have a lid. Add 50g of the bacon, if using, fry until lightly golden, then scoop out with a slotted spoon and set aside.

Sweat the onions in butter, lard or dripping until wilted, add a glass of wine, and leave to cook until very soft. Photographs by Dan Matthews for the Guardian.

Turn the heat right down, add the onions to the pan, season with salt, stir well to coat and cover. Cook until wilted (about five to 10 minutes), then remove the lid and add the wine. Cook the onions until golden, but not browned, and all the liquid has evaporated – this will take about an hour, with occasional stirring, especially towards the end. Take off the heat and leave to cool.

Meanwhile, grease a deep, roughly 23cm tart tin. Heat the oven to 200C (180C fan)/390F/gas 6. Melt the butter and water for the pastry in a small pan until bubbling. While it’s getting there, put the flour and salt in a bowl, then tip in the bubbling butter. Mix until you have a ball that comes away from the sides of the bowl.

Line a greased tin with hot-butter pastry, then press it in to cover the base and sides, with a little overlap.

Put the pastry into the tin, and press with your fingers until it covers the base and all the way up the sides, so it sticks out a little around the top. Prick all over with a fork, reserving any extra pastry for patching. Bake for 20 minutes until golden and crisp.

While the shell is baking, whisk together the eggs and cream, then pour into the pan with the onions. Add the cooked bacon, if using, and season well with pepper, grated nutmeg, and a little more salt, if necessary.

Whisk the eggs and cream, stir into the onion mix with fried lardons, then season and add grated nutmeg.

Spoon the filling into the tart shell, smooth the top and scatter the remaining bacon over the top. Turn down the heat to 180C (160C fan)/350F/gas 4, and bake the tart for about 40 minutes, until golden and set. Leave to cool to warm before slicing and serving.

Blind bake the pastry for 20 minutes, then pour in the onion mix. Top with uncooked bacon and bake again.

• Onion tarts: does Alsace do the best ones, or have you another great recipe up your sleeve? And which other dishes would you recommend to make the most of the humble onion?