By mid-June 1945 the cabinet had agreed to approach the Soviet Union to act as a mediator for a negotiated surrender but not before Japan's bargaining position had been improved by repulse of the anticipated Allied invasion of mainland Japan.