During the months of August and September 1936 Nationalist forces gained important military victories, consolidating the Portuguese border after the Battle of Badajoz on August 14 and closing the Basque-French border after taking control of Irun on September 14. These advances coincided with the progressive shift in Soviet policy towards active intervention. The Soviet Union moved to establish diplomatic relations with the Spanish Republic, and appointed its first ambassador to Spain, Marcel Rosenberg (former Soviet representative to the League of Nations), on August 21.