Tens of thousands of Turks have taken to the streets to mark the first anniversary of a failed coup.
Many headed to the Istanbul bridge that became a landmark of resistance after an army faction tried to seize power.
President Recep Tayyip Erdogan will unveil a memorial there for the 260 people who died fighting the coup. Some 2,196 were also wounded.
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.”
Mr Erdogan flew from the parliamentary session to Istanbul, in a plane accompanied by air force jets.
He will join the huge crowds on the bridge over the Bosphorus where civilians had confronted pro-coup soldiers last year. 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, 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.
The BBC’s Turkey correspondent, Mark Lowen, says that, a year on, the unity against the coup has faded, and divisions over the rule of law have widened. For half of the country, he says, 15 July was its rebirth; for the other half, its aftermath is killing off what was left of Turkish democracy.
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.
Turkey marks anniversary of failed coup with mass rallies