Turkey is holding a series of events to mark the first anniversary of a failed coup in which at least 260 people died and 2,196 were wounded.
President Recep Tayyip Erdogan will unveil a memorial on an Istanbul bridge that became a landmark of resistance and will later address parliament.
An army faction tried to seize power last 15 July but the attempt collapsed.
The government has since dismissed more than 150,000 state employees, saying it is rooting out coup supporters.
Critics say the dismissals, and a wave of 50,000 arrests, are part of an attempt to purge dissent.
The date of 15 July has been declared an annual holiday.
Kicking off a series of events that will extend into dawn on Sunday, Prime Minister Binali Yildirim told a special session of parliament that 15 July 2016 was a “second War of Independence”, following the conflict that led to the creation of the modern state in the 1920s.
“It has been exactly one year since Turkey’s darkest and longest night was transformed into a bright day, since an enemy occupation turned into the people’s legend,” Mr Yildirim said.
However, Kemal Kilicdaroglu, the head of the main opposition Republican People’s Party, condemned the government’s actions since the coup.
He said: “This parliament, which withstood bombs, has been rendered obsolete and its authority removed. In the past year, justice has been destroyed. Instead of rapid normalisation, a permanent state of emergency has been implemented.”
Mass rallies are now under way, with thousands gathering in Istanbul, waving national flags.
Mr Erdogan will attend an event on the bridge across the Bosphorus where crowds had confronted soldiers. It has been renamed the Bridge of the Martyrs of July 15 and the president will unveil a “martyrs’ memorial” there.
Istanbul is awash with giant anniversary billboards and posters showing people confronting pro-coup soldiers, with anti-coup slogans strung between the minarets of mosques.
Mr Erdogan will later return to Ankara to address parliament at midnight (21:00 GMT), the exact time last year it was attacked by coup plotters.
He will unveil a monument to the coup’s victims at his palace in the capital at dawn.
On 15 July last year, the coup plotters, armed with tanks, warplanes and helicopters, declared that they had taken over on state media, and bombed parliament and other key locations.
They tried to detain Mr Erdogan as he holidayed in an Aegean resort, but he had left and the coup was thwarted by civilians and soldiers loyal to the president.
The Turkish authorities accused a movement loyal to the Muslim cleric, Fethullah Gulen, of organising the plot.
Mr Gulen, who remains in the United States, denies any involvement.
Washington has so far resisted calls from the Turkish authorities to extradite him.
Mr Erdogan and his supporters may see the defeat of the coup as Turkey’s rebirth, but for others it is less triumphant, says the BBC’s Mark Lowen, with the memory of the attempt dividing the country.
Critics say Mr Erdogan is using the purges to stifle political dissent, and last week hundreds of thousands of people gathered in Istanbul at the end of a 450km (280-mile) “justice” march against the government.
The president accused the marchers of supporting terrorism.
On Friday, the government continued its dismissal of state employees, sacking another 7,395 for alleged links to what it calls terrorist groups.