Attempted Jedi Coup

Just as Palpatine wanted, at the end of the Clone Wars, Jedi Master Mace Windu and the other Jedi Council members to take matters into their own hands and arrest Palpatine themselves, then rule the Republic until democracy can be re-established.

Background
In the final years of the Galactic Republic, many Senators did not trust the Jedi—a trait that many Jedi also had towards the Senators. A few years prior to the outbreak of the Clone Wars, Senators Sano Sauro and Bog Divinian tried to stir anti-Jedi sentiment into the Senate by proposing that the monastic Order should be exempt from the activities of the Senate. However the Senators' claims did little to ban the Jedi Order, and the vote ended in favor of the Knights. Senator Sauro even turned his back on Divinian. After being bribed by Supreme Chancellor Palpatine with an offer to become Deputy Chancellor, he voted in favor of the Jedi.

In fact, Palpatine himself provoked this coup against himself. The coup by the Jedi will provided him with a reason for the start of the Great Jedi Purge and declaring new order.

The Arrest


After the Battle of Coruscant, the Jedi learned that Palpatine was Darth Sidious, the Dark Lord of the Sith responsible for the War to begin with. Mace Windu lead a group of Jedi Masters to arrest Palpatine. Palpatine greeted the Masters cordially, as though nothing had changed, though he knew that the endgame had begun. Mace boldy ignited his lightsaber, declaring that Palpatine was under arrest and that the Senate would decide his fate. "I am the Senate", Palpatine proclaimed, revealing an electrum saber of his own design hidden in his sleeve. A crimson blade ignited, and within seconds the Jedi Masters realised they had been tricked, that they were pawns that had been manipulated for the last thirteen years. With a Sith snarl more animal than man, Palpatine lunged forward. With the advantage of surprise on his side, Palpatine had enough time to quickly kill Masters Tiin, Kolar, and Fisto, leaving him alone with Windu.

After several minutes of dueling, where Palpatine used a combination of the Ataru lightsaber style and possibly Juyo technique, the Jedi Master managed to finally defeat Palpatine by knocking the Sith Lord's lightsaber out a window only moments before Anakin Skywalker entered the room. This may not have been a coincidence, as it is possible that Palpatine was simply feigning defeat to gain Anakin's sympathy, knowing that the only way to break Anakin’s connection to the Jedi was to force Anakin to choose between loyalty to them and his promises of the power to govern life and death. Palpatine's attempts to defend himself with Force lightning were futile, as Windu used his lightsaber to reflect it back at the Sith Lord, seemingly melting Palpatine's face. Anakin saw a helpless old man, deformed by what looked to be injury, begging in his augmented, ragged and deep voice for pity under the boots of a powerful Jedi Master that held his lightsaber close to his neck and threatened to kill him.

The young Jedi Knight chose Sidious, severing Mace's sword arm. Sidious then took the opportunity to blast Mace from the building with a devastating blast of Force lightning, removing one of the greater threats to his power. He dubbed his new apprentice Darth Vader, and told him that while he never learned Plagueis's secret technique used to preserve life, he thought they could achieve it together (which, considering Palpatine's history, may have been a lie).

Aftermath
Using the huge distrust for the Jedi among the populace, Palpatine launched the Great Jedi Purge. Anti-Jediism was now open government policy.