Three of the plant’s four reactors had been shut down. Prime Minister Péter Magyar said the river came within millimeters of forcing a full shutdown overnight before rising by morning. In Szentendre, north of Budapest, water-use restrictions remained in force after thousands of residents temporarily lost drinking water when demand overwhelmed the local network. Temperatures were expected to reach about 40 degrees Celsius, with little relief before the weekend. Hungary and Romania increased electricity imports as their nuclear plants cut production because of insufficient cooling water. Romania began buying power from Ukraine, reversing the wartime pattern in which European neighbors supplied Ukraine’s damaged grid. Rain was forecast upstream later in the week, but its impact remained uncertain.