By 1977 the voters were tired of Bandaranaike's socialist policies and elections returned the UNP to power under Junius Jayewardene on a manifesto pledging a market economy and "a free ration of 8 seers (kilograms) of cereals". The SLFP and the left-wing parties were virtually wiped out in Parliament (although they garnered 40% of the popular vote), leaving the Tamil United Liberation Front, led by Appapillai Amirthalingam, as the official opposition. This created a dangerous ethnic cleavage in Sri Lankan politics.
Bandaranaike had her civic rights removed by an act of Parliament. In 1978 Jayewardene introduced a new constitution making Sri Lanka a presidential 'Democratic Socialist' republic, with himself as executive President. In 1980 he crushed a general strike by the trade-union movement, jailing its leaders. When the UNP member for the parliamentary constituency of Kalawana was removed on an election petition by his Communist opponent, Jayawardene allowed him to continue sitting in the house.
In 1977, Colombo abandoned state controlled economic policies and its import substitution trade policy for market-oriented policies and export-oriented trade. This included the opening of free-trade zones with a heavy emphasis on exports of garments from these zones.
Elections to District Councils in 1981 were marred by the open theft of ballot boxes in Jaffna. The Jaffna Library, the repository of thousands of valuable documents was burned down by thugs alleged to be linked with the government.
President Jayawardene had the constitution amended (one of 13 amendments during his 10 years in office) to allow presidential elections to be held early, in 1982. The main opposition candidate, Hector Kobbekaduwa was garlanded with onions by the farmers of the Jaffna peninsular, impoverished by the policy of unrestricted imports.
The Presidential election, held amidst widespread acts of electoral malpractice (Hector Kobbekaduwa arrived at the polling station only to find his vote had already been cast) resulted in Jayawardene's re-election. He followed this with an infamous plebiscite on postponing parliamentary elections for six years. Associates of Kobbekaduwa, such as TB Ilangaratne and Vijaya Kumaratunga, were jailed as 'Naxalites', a political creed unheard of in Sri Lanka, before or since. The Commissioner of Elections, in his report on the referendum, reported that it was flawed.
In 1983 following a demonstration against the US establishment of a military base in Diego Garcia, former MP Vivienne Goonewardena was physically assaulted at a police station. Her fundamental rights application in this matter was upheld by the Supreme Court in an act of judicial independence . Following this, thugs stoned the houses of the Supreme Court judges who had made the ruling and the police officer who had been convicted had his fine paid by the government and received a promotion.