The invasion ended on 6 October 1939 with the division and annexing of the whole of the Second Polish Republic by Germany and the Soviet Union .
Germany and the Soviet union divided the whole of the Second Polish Republic .