Pest is a county (megye) in central Hungary. It surrounds the national capital Budapest. The River Danube flows through the county. The present county Pest was formed after World War II, when the former county Pest-Pilis-Solt-Kiskun was split in two parts (the other part is within present-day Bács-Kiskun). Pest County also existed in the early days of the medieval Kingdom of Hungary (11th century). Its territory comprised approximately the north-eastern part of present Pest County. It was combined with adjacent Pilis county before the 15th century.