on 17 september , when the relentless onslaught of the german forces had swept the government to kuty , poland was invaded by the soviet army , which occupied the area agreed to in the secret protocol to the nazi-soviet pact .