Spain is the biggest producer of pumpkins in the European Union, according to a study by the bloc's statistical office Eurostat released in time for Halloween, as children across the continent carve the squash to make ghostly decorations.

Spain produced 115,000 metric tonnes (125,765 tons) of pumpkins and other members of the gourd family in 2017, followed by France (96,000 tonnes), Germany (92,000 tonnes), Portugal and Poland (both 75,000 tonnes), according to EU data.

"Pumpkins are particularly popular at this time of the year, whether it is for cooking tasty meals or carving out faces to make spooky lanterns," Eurostat said.

EU member states allocate a total of 24,000 hectares (59,305 acres) towards the cultivation of the distinctive squash, Eurostat added.

On the lead up to Halloween, carved pumpkins known as jack-o'-lanterns are a stalwart feature of spooky household decorations.