To attack British India, British Burma and British Malaya, the Empire of Japan needed to use bases in Thailand. By playing both nations against one another, Prime Minister Phibunsongkhram was able to maintain a degree of neutrality for some time. However, this ended in the early hours of 8 December 1941, when Japan launched a surprise attack on Thailand at nine places along the coastline and from French Indo-China. The greatly outnumbered Thai forces put up resistance, but were soon overwhelmed. By 07:30, Phibun ordered an end to hostilities, though resistance continued for at least another day until all units could be notified. Phibun signed an armistice with Japan that allowed the empire to move its troops through Thai territory. Impressed by Japan's easy conquest of British Malaya, Phibun formally made Thailand part of the Axis by declaring war on the United Kingdom and the United States, though the Regent refused to sign it in the young king's name. (The Thai ambassador to Washington refused to deliver the declaration, and the United States continued to consider Thailand an occupied country.) An active and foreign-assisted underground resistance movement, the Free Thai, was largely successful and helped Thailand to viewed positively in the eyes of the victorious Allies after the war and be treated as an occupied nation rather than a defeated enemy.