ISTANBUL — Less than a week after the largest opposition rally in Turkey in years, hundreds of thousands of President Recep Tayyip Erdogan’s supporters made their own show of strength by gathering on Saturday night to commemorate the anniversary of last year’s failed coup.

It was a sign that the president, who has led a vast crackdown against his opponents in the 12 months since the botched putsch, still has significant support.

The failed coup has given Mr. Erdogan more opportunities to buttress his new national narrative for the country and extend his grip on power, firing or suspending about 150,000 people and arresting 50,000 others suspected of supporting the coup attempt.

Mr. Erdogan has often referred to the coup plotters’ defeat as a “second war of independence,” and the rally on Saturday was the centerpiece of an elaborate day of pageantry that implicitly placed the president as the hero of what he implies is a liberation struggle.