ISLAMABAD, Pakistan — Nawaz Sharif, the tycoon and party leader who helped define a turbulent era of Pakistani politics, stepped down as prime minister on Friday after the Supreme Court ruled that corruption allegations had disqualified him.

Coming with less than a year to go in his term, his ouster adds to a grim and long list of civilian governments cut short in Pakistan — including two of his own previous terms as prime minister. And it will further roil the country’s tumultuous political balance, as his rivals vie to exploit his fall.

When Mr. Sharif returned to office in 2013, it was as a widely popular party leader with a deep grudge against the country’s powerful military establishment. He moved quickly to try to establish civilian authority in areas that had long been dominated by generals, especially foreign policy.

But Mr. Sharif, 67, is exiting with none of those ambitions realized.

The Pakistani military has seldom been able to wield as potent a mix of policy control and popular acclaim as it does now. The fragile democratic system in this nuclear-armed nation of almost 200 million people again appears to be on shaky ground. And Mr. Sharif’s own political legacy stands further tarnished.