= Hamburg =
The histoy of Hamburg reaches back int othe 9th century. Hamburg, founded as a base for Christianize of Saxony, in medieval times became one of Europe's foremost trading sites. Besides the well suited location of the port of Hamburg the century long independence and political independence strengthened the city in her development into the free Hanseatic town of Hamburg. 
[c] Pre-history [c]
After the melting of the ice shield, which covered the are of Hamburg during the last Ice age, followed a period of 17'000 years of nomadic hunter and gathers who settled in the river valley of the Elbe. There are many archaeological discoveries of tools from the New Stone Age, e.g. from the Ahrensburger and Hamburger culture from the Stellenmoor tunnel valley near the border of Rahlstedt and Ahrensburg as well as discoveries from the Fischbeker moor southwest of Hamburg, which proof a nomadic lifestyle in the area. The oldest evidence of a permanent settlement date back to the 4th century BC. Also in the Saxony forest megalith tombs proof a prehistoric settling.
[c] Antiquity [c]
The advance of Romain expeditionary troops into the Hamburg area cannot be proven archaeologically and probably is a legend. However the Romans have known a site at the mouth of the Alster, which they named Treva and is potentially located at the location of the current town. This denomination of Hamburg is still used in Irish. Never the less there are many material findings from the area of Hamburg that prove active trading with the Romain area of influence like Romain gold coins from Eppendorf or Lokstedt. During the 1st and 5th century intensive settlements in the Hamburg-Framsen-Berne area could be found where traces of numerous homes and iron smelting sites were discovered.
Since the 4th century the Northalbing Saxons settled in the area north of the Elbe. Evidences of settlement are located on the moraine ridge at the mouth of the Alster and a Saxon burial ground in Hamburg-Schnelsen, together with the horseman tomb of Schnelsen as one of the most exceptional tombs there. The influx continued till the 6th century.
[c] Early Middle Age - Hamburg as mission center [c]
In 811 AD Charlemagne let construct a baptism church between the rivers Bille and Alster, after his Franks together with the support of the Slavic Abodrites had conquered the are of Saxony. The main task of the priest Heridag, who was in charge, was the Christianization of the pagan north which included Schleswig-Holstein, Denmark and Scandinavia. To protect the church and inhabitants a getaway castle - the Hammaburg - was constructed, probably in the area of the current dome place. It offered shelter for 40 to 50 people, had the dimensions of 130 m x 130 m, the walls were 5 to 6 m high and about 15 m wide. It served as protection against enemy tribes of the Saxons and Slavs. The name "Hammaburg" is documented in name for the first time in 832. The exact origin of the name is not clear without doubt. One version reasons that the castle was built upon the ruins of a Saxon village called "Hamm". More recent research results however indicate that the name was deduced from the old German word "Hamme". Hamme signifies a secured flank of a moraine that is surrounded by impassable area (bog). In the case of the first settlement of Hamburg this hillside was so well protected by natural conditions that the inhabitants named it as "Hammaburg". A factual burg (castle) should not have existed at first. 
831 Ludwig the Pious founded a bishopric in the Hammaburg, which was elevated in 832 by pope Gregor IV to an archbishopric. The deed of foundation was granted on 15th of May 834 by the Frankish emperor Ludwig the Pious. In the year 834 the first coins were struck in Hamburg. As first bishop the Benedictine monk Ansgar of Bremen was selected, who erected the Mary church as the base church of his mission, which was a simple wooden construction but still the very first beginning of the great Cathedral of Hamburg (Dome). In addition there was also a school and a monastery - it is disputed if there was even a library to collect the handwritten books. To cover the not so small expenses there was the income of the abbey Turholt in Flanders, which however was passed to the west Frankish king Karl the Bald after the split of the empire. This split, which was a sign of the dwindling power of the Carolingian, caused the destruction of German settlements at the mouth of the Elbe by the Dane Vikings and Normans in 845 which did not halt at Hamburg, burned down the religious buildings and leveled the Hammaburg.
Ansgar flew to Ramelsloh (about 30 km south of Hamburg). After the death of bishop Leuderich of Bremen it was decided on the synod in 848, to give back to Bremen the north Elbe leg, passed to Verden, together with the archseat in Hamburg. The archbishopric Bremen-Hamburg was created. By this Bremen was dissolved away from the metropolitan union with Cologne. This cause a protest of the in 850 newly elected archbishop Gunthar of Cologne, who however accepted the practical order which condoned his existing privileges. This caused at first a stand still. But when Gunthar, due to the marriage of Lothar II., was excommunicated, pope Nikolaus I. granted the foundation bull for the archbishopric Bremen-Hamburg on 31st of May 864. To the king wrote however that the bishop of Bremen and his successors should have power and honor in Bremen like an archbishop over the Danes and Swedes.
Already 915 the settlements was reduced to rubble by the first documented raid of the Slavic Abodriten. In the following years the archbishop Adaldag restored the archbishopric, let a new castle build, the village inhabited by craftsmen and chandlers expand and granted Hamburg the market privilege and laid thereby the founding stone for Hamburgs later status as trading town. He oversaw various diocese: Schleswig, Ripen, Aarhus and Oldenburg. Since 964 pope Benedict V. spent his twilight years here in his exile, when he was ejected from Rome. After his death his bones were entombed in the Mary Cathedral, until they were transfered to Rome in 999. In the same year (966) the Romain-German emperor and duke of Saxony Otto I. granted his representative and prince of Saxony Hermann Billung the mundane power. Never the less Adaldag was able to work independently also because he partook at the crowning of emperor Otto I. in 962. After the defeat of Otto II. in calabria and the accompanying military weakening  resulted in a common revolt of the Wendic and attacks by the Danes. The prince of the Abodorites Mistui leveled Hamburg in the year 983.
[c] High Middle Age - from a mission center to a trading city [c]
The reconstruction of the inner town took till the beginnings of the 11th century. Archbishop Bezelin Alebrand started in 1037 the construction of the church of Mary, the monastery and the diocese palace with cut stones - the very first stone buildings in the region. The city was being fortified by a circular wall with twelve defensive towers. On the south side of the dome a solid castle was build, the Wiedenburg, upon that Billunger Bernhard II. constructed the Watercastle, also called the new castle, from 1024 till 1025 in the area of the Nikolai ruin/hop market. The market place, the center of the daily life was located opposite the Petri church. Under the reign of archbishop Adalbert, who was not only a friend of Heinrich's III., but as well the educator and advisor of his son Heinrich IV. and according to rumors denied the papal office, the city further bloomed between 1043 and 1072. In 1060 Hamburg was split into the archbishopric reigned inner town and the ducal reigned new town because the city grew so fast. Hamburg once again became the center of missioning of the Scandinavian countries and first trade routes toward north and east were established, which reached as far as Iceland, Greenland and Finland. The extension of the fortification was planned but archbishop Adalbert (a crystal mosaic was on the emperor Karl fountain) was overthrown at the Reichstag in Tribur in 1065. Due to the power struggle for a successor the Obodrites under their leader prince Kruto saw a chance and invaded Nordalbingien. 1066 and 1072 Hamburg was again raided by the Obodrites, that is why the archbishops left Hamburg and from then on resided in Bremen; Hamburg lost its ecclesiastic dominance in the north.
In 1106 the dynasty of Billunger died and Adolf I. of Schauenburg was assigned as successor for Gottfried, who was slewn by the Abodrites, by Saxon duke Lothar as count of the counties Stormarn and Holstengau and thereby of the ducal part of Hamburg. He ordered to embank, drain and settle the Elbe marches and islands. In 1124 under Adolf I. the Alster was dammed for the first time for a corn mill at the great Burstah. His son and successor Adolf II. did not set any priorities in Hamburg but allowed a time of steady growth, even though he was in conflict with the emperor over his counties and founded Lübeck on the side. Under Adolf III. (reign 1164 - 1203) in the area of the new castle the new town for merchants was established which stood under comital influence. Representative of the count for the administration of this new town was Wirad of Boizenburg.
In 1189 emperor Friedrich I. Barbarossa is reported to have handed over a charter to the city. Hamburg got this as thank you for their support at the crusade in the Holy Land. The charter contained four important issues for Hamburg: Hamburg did not to pay any duties unto the North sea, the military duty was set aside, citizens of Hamburg where only called upon the protection of Hamburg, in an area of 15 km surrounding Hamburg no castle is allowed to be constructed, and the people of Hamburg was allowed to raise cattle, catch fishes and cut down trees. Due to lack of an authentic document in the year 1265 the Barbarossa-charter was written down based on still existing and probably biased documents. Another interpretation is that the charter was forged to start with by merchants of Hamburg. In 1190 the bishopric inner twon and the comital new town elected an aristocratic council, as Adolf III. was absent as he partook on the third crusade. This freedom resulted in the construction of two city halls (1200). In the 13th century Hamburg was marked by wars. In 1201 duke Waldemar II. invaded Hamburg, occupied the city and caught Adolf III. Friedrich II. of Staufen  yielded his land north of the Elbe to the kingdom of Denmark to secure a pact against the Welfs. Hamburg was administered by a Dane representative. The foreign occupying force let both parts of the city grew closer together. Hamburg was united with on city hall, council and court. 
On 22nd of July 1227 a north German coalition of prices with the support of the citizens of Hamburg defeated the Danes in the battle at Bornhöved decisively. The city submitted to the rule of Adolf IV of Schauenburg, who was sovereign of the whole city since 1228. Even before the start of his reign of the town he donated the first monastery (1227), St. Maria-Magnalena Franciscan monastery (at the location of stock exchange, was pulled down in 1837). Adolf IV. almost let Hamburg to its own devices and its positive development. Due to the privileges of the charter trade and craft developed well, especially the brewery. Merchant guilds and foreign trading offices were established. In 1239 Adolf IV retired to the monastery he had donated and later achieved in Rome the ordination of the priesthood (1244).
Starting in 1240 a new line of fortification was laid down, that already surrounded in 1250 most of the inner town of Hamburg and which's layout and names still dominat the cityscape. In this period of extension also many monasteries and hospitals were founded. 
In 1270 the "Ordeelbook" (Judgmentbook) defining the civil-, juridical- and process-law took effect. The used term of "freie Stadt" (free city) was at the time at least unusual.
On 5th of August 1284 Hamburg was struck by a devastating fire, which afflicted the inhabitants (about 5000) hard.
In 1286 duke of Saxony-Lauenburg passed half of the island "O" in front of the north west tip Hadelns to the city. There the city built a light beacon in 1299, the "Neue Werk" (new work) upon which the island is known today (Neuwerk). The tower constructed there in 1367 was important to protect the mouth of the lower Elbe against the enemies of Hamburg. Based from Neuwerk the neighboring castle Ritzbüttle was conquered in 1388 and hold durably. In 1394 Hamburg founded the office Ritzebüttel and moved the seat of the captain from Neuwert to Ritzebüttel.
From 1292 the council of Hamburg had legislative power.
In 1350 the "Black Death", the great European plague pandemia, reached Hamburg and cost 6000 lives.
Since the middle of the 14th century there was a wooden Roland statue in Hamburg, which however was destroyed already in 1389 when it was sunk in the Elbe.
[c] Late Middle Age - one of the most important partners in the Hanseatic league [c]
In the 12th and 13th century the trade became more important and interconnected in north Germany and newly founded ports at the coast of the Baltic sea flourished (Lübeck, Rostock, Wismar, Stralsund). Merchants from these cities as well as Hamburg and Lüneburg often represented their interests together outside of north Germany (e.g. Stalhof in London, in Burges or in the Bryggen in Bergen), the Hanseatic league was born. Stations of Hamburg on its way into the Hanseatic league where the adaptation of the Lubic law 1188, a treaty to secure the land road between Lübeck and Hamburg 1241, the achievement of trading privileges in Flanders 1252, England 1266, Sweden 1261, Norway 1283 and France 1294 as wall as a common currency with Lübeck since 1255. Low-German replaced Latin as official language, a property and schoolbook was introduced and some merchants began their own bookkeeping. In the course of time Hamburg identified itself through the interests of merchants and councilmen and the Hanseatic league changed from a pact of merchants into a league of cities.
Together with the gain of sea trade increased piracy went along. At first (since 1265) Hamburg suffered from the Dithmarschern, who regularly captured and plundered ships on the Elbe. Only a treaty of the Holstein count with the Dithmarschern resolved the situation in 1323. Since 1390 attacks of former Vitalienbrothers on ships of Hamburg in the North sea are documented. After damageable captures Hamburg and Lübeck equipped warships (Orleg ship) in 1400 against the Likedeeler and captured first (1401) the fleet of Klaus Störtebeker, later also the one of Gödeke Michels. After the execution the heads of the pirates were nailed to poles and exhibited to display. Only the last North sea pirate (Claus Kniphoff) was caught in 1525.
The Hanseatic time brought about an until then unknown wealth. Among others it was used to acquire for Hamburg important holdings from people and institutions of the surrounding country, like the Alster in three transactions 1306, 1309 and 1310, 23 villages located at the Alster and five at the Elbe. In addition all important sacral and mundane buildings were constructed, extended or finished. Among them the Dome of Mary (till 1329) and the churches St. Petri (1324-1418), St. Katharinen (till 1450), St. Jacobi (till around 1400) and St. Nikolai (since 1335). On top of that a new city hall and a city fortification out of brick were constructed. Bourgeois representative living quarters were built. Elb islands were bought and/or embanked.
In the 15th century the rise of the territorial sovereigns started. They encroached on the privileges of the Hanseatic cities. In addition the volume of sea trade decreased while the trade on land increased, so the Hanseatic league was missing more and more funds for an independent policy. On top of that English and Dutch merchants participated very successfully in the emerging over sea trade. The downfall of the Hanseatic league had begun. At the beginning of the century the trade with Iceland started. In 1423 the first naval travel is mentioned. The seamen were at first part of the England sailing company and sailed later when they became separate companies to Iceland, the Shetlands and the Faroese.
After political revolts in Lübeck Hamburg lead the Hanseatic league from 1410 - 1416. The council of Hamburg granted each parish a legislative record, stating the rights and privileges of the citizens. This first constitution of Hamburg was only valid for seven years. In 1420 troops of Hamburg and Lübeck captured the castle Bergedorf to protect the land road between both cities and put the village in the treaty of Perleberg under the administration of both towns. The Holk started to replace the Cog as the most used ships type for trading ships. In 1450 the council of the city marked the navigable water of the Elbe by barrels. With the death of the last count of Shauenburg in 1459 a long time started for Hamburg, where the won privileges hat to be defended against the neighboring sovereigns on a regular basis. Inner political riots happened in 1458 and 1483, which were however reconciled by concessions of the council in the second and third legislative record. From an inheritance in 1479 the first public library in Germany was opened. 14 years later the first citizens printed books. According to tradition the library was seldom used and the printer had to quit their profession in Hamburg under pressure of the cleric. as part of the reform of the empire Hamburg became part of the lower Saxony district in 1500.
[https://de.wikipedia.org/wiki/Geschichte_Hamburgs, 2015-09-11]