Not much of an invasion to begin with. Brits and the Dutch were competing for influence in the region at the time. So Stamford Raffles persuaded the local ruler to allow the East India Company to establish a base at Singapore in 1819 and soon there was a settlement there with soldiers and so on. In 1826, Singapore was incorporated in the Straits Settlement Colony when it was established.
By 1941, Singapore had grown to be a hugely important commercial and strategic military base. Its rapid fall to the Japanese that year was a disaster for Britain of staggeringly large proportions.
During the war we conducted assorted incursions into Singapore. In the highly successful Operation Jaywick, British and Australian commandos aboard a Japanese fishing boat, renamed the Krait, made their way to Singapore and a team then paddled into the harbour to sink seven ships with limpet mines. The Krait and its crew returned safely. Which was sadly not the result of the follow-up attack, Operation Rimau, in which three ships were sunk in Singapore Harbour, but at a terrible cost in terms of team members killed in battle or executed afterwards by the Japanese.
In 1945, we launched Operation Tiderace to retake control of Singapore.
Japan formally surrendered on 15 August. On 31 August, Allied troops set sail from Trincomalee and Rangoon. On 5 September, British warships disembarked British and Commonwealth troops who were cheered with wild enthusiasm by Singaporeans as they marched through the city. A week later, Admiral Lord Louis Mountbatten accepted the surrender of the Japanese military command in Singapore at Singapore City Hall. Singapore joined Malaysia in 1963 and became independent in 1965.