At first James was successful in foreign affairs. In 1604 he ended the war with Spain. Britain was at peace for the next 20 years but in 1624 James was drawn into war on the side of his Protestant son-in-law, the German prince Frederick, Elector Palatine.