Ansbach (/ˈænzbæk/; German pronunciation:[ˈansbax]) is a city in the German state of Bavaria. It is the capital of the administrative region of Middle Franconia. Ansbach is situated 25 miles (40km) southwest of Nuremberg and 90 miles (140km) north of Munich, on the Fränkische Rezat (Rezat River), a tributary of the Main river. As of 2004, its population was 40,723.