The outbreak of World War II saw a return to heightened security in Merrion Street. The Emergency Powers Act, passed in September 1939, gave the government power to introduce by emergency order any measures necessary for the security, public safety or preservation of the state. In the summer of 1940 there were real fears that Ireland would be invaded by Germany, and an inter-departmental committee was established to draw up contingency plans for maintaining a government in the event of an invasion. Regional commissioners were appointed, and plans drawn up to evacuate many thousands of Dubliners. Happily these plans were not needed, though the threat of British forces seizing Irish ports or of an invasion by US forces based in Northern Ireland preoccupied the government later in the war.
The 1948 general election brought the first change of government since 1932, when the first inter-party (coalition) government came to power under the leadership of John A. Costello of Fine Gael. In 1948 this government broke the last links with Britain and declared Ireland to be a republic with effect from Easter Sunday 1949.