Samarakkody became involved in anti-imperialist nationalistic politics in the early 1930s when he joined the Colombo South Youth League (CSYL), an affiliate of the All Ceylon Youth Congress.[5] In 1933 Indian workers at the Wellawatte Spinning and Weaving Mills went on strike and were supported by the CSYL.[5] The strike was undermined by A. Ekanayake Gunasinha and his Ceylon Labour Union which used Sinhaleseblacklegs to break the strike.[5] In the 1920s Gunasinha had been the first to organise labour in Ceylon.[5]Colvin R. de Silva, Leslie Goonewardene, Philip Gunawardena, Samarakkody and S. A. Wickramasinghe established the Wellawatte Mill Workers Union with de Silva as its president.[5]
Samarakkody was one of the founding members of the Lanka Sama Samaja Party (LSSP) in December 1935 and was elected to its executive committee.[2][4][5] He took a leading role in militant leftist action, including the strikes at Vavasseur Coconut Mill and the Colombo Commercial Company Fertiliser Works in 1937, the latter for which he and Goonewardene were arrested.[4] The LSSP was beset with internal divisions - militants within the party (Colvin R. de Silva, William de Silva, Goonewardene, Vernon Gunasekera, Philip Gunawardena, Robert Gunawardena, N. M. Perera, Samarakkody etc.) formed the "T" group (Trotskyist) which sided with Leon Trotsky in the International Communist whilst Stalinists (P. Kandiah, M. G. Mendis, A. Vaidyalingam, Wickramasinghe etc.) formed another group.[5] The Stalinists were expelled from the LSSP in 1940 and went on to form the United Socialist Party (later reconstituted as the Communist Party of Ceylon) in 1941.[4][5][6]
When World War II broke out in September 1939 the LSSP opposed the "second imperialist war".[3][4] The LSSP played a major role in a wave of strikes in 1939/40 and consequently it was proscribed in 1940 and its leaders Colvin R. de Silva, Philip Gunawardena, Perera and Samarakkody arrested in June 1940.[4][5][7] Goonewardene evaded arrest and went into hiding.[5] The quartet were imprisoned at Welikada Prison but after staging a hunger striker they were transferred to Bogambara Prison.[4][5][7] The four LSSP leaders, aided by sympathetic prison guards, escaped from Bogambara on 7 April 1942 and whilst de Silva, Gunawardena and Perera fled to India Samarakkody went into hiding in Ceylon.[5][7]
In India the LSSP leaders merged their party with the Bolshevik Leninist Party of the United Provinces and Bihar and the Bolshevik Mazdoor Party of India to create the Bolshevik–Leninist Party of India, Ceylon and Burma (BLPI) in April 1942 with the LSSP as its Ceylonese branch.[4][5] De Silva, Gunawardena and Perera were arrested by the Indian police in 1943 after being betrayed by Stalinist called Shukla and deported back to Ceylon.[5] Other LSSP members (Hector Abhayavardhana, Doric de Souza, Leslie Goonewardene, Vivienne Goonewardene, V. Karalasingham, Allan Mendis and Bernard Soysa) stayed behind in India to build up the BLPI.[5]
Samarakkody was re-arrested in 1944.[5] De Silva, Philip Gunawardena, Perera and Samarakkody were prosecuted, convicted and sentenced to six months in prison.[5][7] Samarakkody lost his civic rights and his license to practice law was suspended for two years.[7] Towards the end of World War II in 1945 Gunawardena and Perera broke from the BLPI and resurrected the LSSP as a separate party.[3] De Silva, Leslie Goonewardene, Samarakkody and Soysa remained in the BLPI.[5]
Whilst Ceylon's main political parties, the United National Party (UNP) and Sri Lanka Freedom Party (SLFP), together with the VLSSP, supported the Sinhala Only Act, the leftists, led by the LSSP, opposed the act.[5] In May 1960 LSSP leader Perera proposed that the party form a coalition government with SLFP.[3] Samarakkody led a group of LSSP members opposed the proposition.[3] De Silva, de Souza, Goonewardene and Soysa initially opposed Perera's proposition but eventually abandoned their beliefs and supported the move.[3] The LSSP joined the SLFP government in June 1964.[5][14] LSSP members who opposed the move (Meryl Fernando, Karalasingham, Samarakkody, Bala Tampoe etc.) left the LSSP and formed the Lanka Sama Samaja Party (Revolutionary) (LSSP(R)) with Samarakkody as its secretary.[3][5][14] In December 1964 the LSSP(R)'s two MPs, Fernando and Samarakkody, together with several rebel SLFP MPs, voted for an opposition amendment to the government's throne speech, defeating the government and precipitating the dissolution of Parliament.[5][14] Fernando and Samarakkody's action proved controversial within the LSSP(R) as they had in effect supported the capitalist UNP which would go on to win the 1965 parliamentary election.[3] The LSSP(R) supported Fernando and Samarakkody's action but some members who opposed it (Karalasingham and the Sakthi group) left the LSSP(R) and rejoined the LSSP in 1966.[3]
Samarakkody stood as the LSSP(R) candidate in Bulathsinhala at the 1965 parliamentary election but failed to get re-elected.[15] Samarakkody fell out with LSSP(R) leader Tampoe and in 1968 left the party, together with Fernando, and founded the Revolutionary Sama Samaja Party (renamed Revolutionary Workers Party in 1973).[3][16][17]