The land belonging to the Lords of Wirdeberch dates back to the year 1081. 50 years after the first documented mention of the name, the lords received the title of Count. In 1495 Württemberg obtained the rank of dukedom. Friedrich I became Prince Elector in 1803, and ascended to the throne as King in 1805 with the support of Napoleon Bonaparte. In the next year he guided his country into the Rhine Confederation. The Württemberg territory doubled in size during the French domination of Central Europe. Parts of Upper Swabia, and the Allgäu came under the Württemberg crown. The royal territory remained unchanged until 1952. At that time Württemberg and Baden joined together to become one state. While the two peoples did not always have an easy time living together, the fusion was considered to be very successful. Today Baden-Württemberg is among the richest German Federal States. Many well-known companies are headquartered there, including the software giant SAP, Heidelberger Printing Presses, and the world"s market leader in model railroading, Märklin. From its beginnings, the Kingdom of Württemberg emphasized construction of state railroads. All of the main lines were built at government expense. The only chance for private initiative was beyond the main trunk lines, i.e. branch lines. The decision of the government to build rail lines could be traced to king"s love of railroading, among other reasons. Consequently, there were several locomotive builders in the kingdom, of which the Esslingen Machinery Company was the most important.