On 18 January 1977, Gandhi called fresh elections for March and released all political prisoners, though the Emergency officially ended on 23 March 1977. The Congress was handed a crushing defeat, its first ever since the country's Independence in 1947, by the combined opposition of Janata Party.