In Poland, the Urząd Bezpieczeństwa ("Security Office", or UB) was initially formed to wage a covert war against communists in Poland. The "UB" was modelled on the Soviet NKVD, whose specialists had helped forge the new "shield of the state." NKVD chief Ivan Serov had begun training Polish NKVD recruits as early as 1940, when the Soviets initially invaded eastern Poland, including training in the Soviet Union. By 1945, the "UB", under NKVD control, had agents in every branch of the Polish government.