The first pies, called "coffins" or "coffyns" were savory meat pies
with the crusts or pastry being tall, straight-sided with sealed-on floors
and lids. Open-crust pastry (not tops or lids) were known as "traps."
These pies held assorted meats and sauce components and were baked more like a modern casserole with no pan (the crust itself was the pan, its pastry tough and inedible). The purpose of a pastry shell was mainly to serve as a storage container and serving vessel, and these are often too hard to actually eat. A small pie was known as a tartlet and a tart was a large, shallow open pie (this is still the definition in England). Since pastry was a staple ingredient in medieval menus, pastry making was taken for granted by the majority of early cookbooks, and recipes are not usually included. It wasn't until the 16th century that cookbooks with pastry ingredients began appearing. Historian believe this was because cookbooks started appearing for the general household and not just for professional cooks.
Historians have recorded that the roots of pie can loosely be traced back to the ancient Egyptians. The bakers to the pharaohs incorporated nuts, honey, and fruits in bread dough, a primitive form of pastry. Drawings of this can be found etched on the tomb walls of Ramses II, located in the Valley of the Kings. King Ramses II was the third Pharoh in the nineteenth dynasty. He ruled from 1304 to 1237 B.C. After years of the tomb being looted and weathered, great amounts of effort are in progress with the hope of returning the tomb to a somewhat presentable stage.
Historians believe that the Greeks actually originated pie pastry. The pies during this period were made by a flour-water paste wrapped around meat; this served to cook the meat and seal in the juices.
The Romans, sampling the delicacy, carried home recipes for making it (a prize of victory when they conquered Greece). The wealthy and educated Romans used various types of meat in every course of the meal, including the dessert course (secundae mensea). According to historical records, oysters, mussels, lampreys, and other meats and fish were normal in Roman puddings. It is thought that the puddings were a lot like pies..
The Roman statesman, Marcus Porcius Cato (234-149 B.C.), also know as Cato the Elder, wrote a treatise on agriculture called De Agricultura. He loved delicacies and recorded a recipe for his era's most popular pie/cake called Placenta. They were also called libum by the Romans, and were primarily used as an offering to their gods. Placenta was more like a cheesecake, baked on a pastry base, or sometimes inside a pastry case.
The delights of the pie spread throughout Europe, via the Roman roads, where every country adapted the recipes to their customs and foods.