Yanam assembly constituency in Puducherry witnessed a major upset in the 2021 elections, when independent candidate Gollapalli Shrinivas Ashok defeated All India NR Congress founder-president and incumbent chief minister N Rangaswamy, by a margin of 655 votes. Prior to this, the seat had been dominated by Malladi Krishna Rao, who won five consecutive elections beginning in 1996. Rao first contested as an independent in 1996, securing 62per cent of the vote, and again in 2001 with 57per cent. He later switched to the Congress and won comfortably in 2006, 2011 and 2016, polling 65per cent, 81per cent, and 61per cent of the votes respectively. In the 2021 Puducherry assembly polls, 34,792 of the 36,562 registered voters in Yanam cast their ballots.