Ukraine's parliament has just approved a resolution that allows for the release of Yulia Tymoshenko, a former prime minister and opposition leader who has been in jail since 2011. Tymoshenko's arrest, ostensibly for a natural gas deal she signed with Russia while in office, is widely considered to have been political. She was a major rival to President Viktor Yanukovych and ran against him in the 2010 presidential election.

The parliament, which has 442 seats, approved the resolution by an impressive 310 votes, including dozens of lawmakers in Yanukovych's party. Technically, the vote does not directly call for Tymoshenko to be freed, but amends the country's criminal code in a way that seems likely to lead to her release.

Over the past 24 hours, Ukraine's parliament has passed a series of resolutions that aggressively undermine Yanukovych, curbing both his actual power and his legitimacy as national leader. This may actually be Ukraine's best shot at ending its three-month crisis and averting disaster. But it's an even bigger deal than that, because of what it means not just for Ukraine's present crisis but for its future as a fledgeling democracy.

Here are some other resolutions that parliament has passed in the last 24 hours: ordering security forces to pull back, amnesty for jailed protesters and firing the interior minister who led the crackdowns. These don't just call for an end to the crackdown, but take much of that authority away from the president entirely.

Ukraine's three-month crisis has pitted protesters and the European Union on one side vs. the Yanukovych government and Russia on the other. All sides had been escalating rhetoric and action. So the fact that parliament was able to step in and force a de-escalation was exactly what the country needed: a mediator who has the authority to impose a solution, and that has the legitimacy of a democratic, domestic institution. It had to be Ukrainians fixing this, not Russians or Western Europeans.

That the resolutions were supported by lawmakers from Yanukovych's own party help drive home their authority, which is awfully important, given how polarized the country can be by politics and demographics. This also dramatically undermines Yanukovych, in both fact and appearance.

That could help solve one of the biggest sticking points in the crisis: Protesters say they won't leave the streets until Yanukovych steps down, but he's hesitant to outright resign without at least holding elections first. But if the parliament can make him a lame duck and remove his authority and/or legitimacy, that could help satisfy protesters in a way that doesn't require Yanukovych to step down immediately.

Those are all reasons that these parliamentary resolutions have a great chance, along with compromise deal signed today by Yanukovych and opposition leaders, at helping to end this crisis peacefully. But that's not even the most impressive thing about them.

What makes this an even bigger deal is that, while foreign countries have played a role, it's ultimately Ukrainians pushing through a resolution, and doing it democratically. Most of the time, these sorts of crises end when one side is simply defeated outright, or cuts a middle-of-the-night deal brokered by foreign powers. But what's happening right now in Kiev is being driven by procedural, by-the-letter votes in the country's own parliament. In many ways, it's a victory not just for but by democracy and the rule of law.

And that's maybe the most amazing thing about Parliament so aggressively undermining Yanukovych — that they're doing it democratically, within the rule of law, following all the rules of procedure and form. That’s just extremely rare in "transitional" states in the long process of developing from an authoritarian to democratic system, particularly post-Soviet states. It’s a big deal and a really promising sign for Ukraine’s future, for its ability to adhere to democratic norms and institutions, which is really much easier said than done in transitional states.

To be clear, a lot of the forces that sparked the crisis  are still present. The economy is still a mess. Institutions are still weak and have reputations, not unearned, for corruption. Tymoshenko may be a martyr but she was not exactly a national savior while in office. And returning to the 2004 constitution is good, but the country was not in great shape in 2004 either. So Ukraine has not been transformed overnight into a perfectly functioning democracy, and it will likely face more such crises in the future.

The point is that Ukraine appears to have a way out of the crisis today. And with the parliament taking such a big lead, it may have even resolved things in a way that doesn't just ease today's crisis but makes the country and its government a little better equipped to handle the next one.