Ukraine sits surrounded by more than 100,000 Russian troops on its borders, with world leaders flying in and out of Kyiv hoping to reach a solution to the crisis that averts a looming Russian invasion.

The situation is the most high-stakes embodiment of the country's 30-year history of being caught between East and West, wavering between the influences of Moscow and the U.S. with its European allies.

Through scandal, conflict and two major protest movements, Ukraine has emerged with its democracy intact, at times choosing pro-Western leaders and other times choosing those aligned with the Kremlin.

Now, it faces its biggest test as Russia has closed in. Since the illegal annexation of the Crimean peninsula in 2014, Ukrainians have turned away from Moscow and toward the West, with popular support on the rise for joining Western alliances like NATO and the European Union.

Read on to understand how Ukraine came to where it is today.

The 1990s: Independence from the Soviet Union

1989 and 1990

Anti-communist protests sweep central and Eastern Europe, starting in Poland and spreading throughout the Soviet bloc. In Ukraine, January 1990 sees more than 400,000 people joining hands in a human chain stretching some 400 miles from the western city of Ivano-Frankivsk to Kyiv in the northern-central part of the country — many waving the blue and yellow Ukrainian flag that had been banned under Soviet rule.

July 16, 1990

The Rada, the new Ukrainian parliament formed out of the previous Soviet legislature, votes to declare independence from the Soviet Union. Authorities recall Ukrainian soldiers from other parts of the USSR and vote to shut down the Chernobyl nuclear power plant in northern Ukraine.

1991

Following a failed coup in Moscow, the Ukrainian parliament declares independence a second time on Aug. 24. The date is celebrated as Ukraine's official Independence Day. The Soviet Union officially dissolves on Dec. 26.

1992

As NATO allies contemplate adding central and Eastern European members for the first time, Ukraine formally establishes relations with the alliance although it does not join. NATO's secretary general visits Kyiv, and Ukrainian President Leonid Kravchuk visits NATO headquarters in Brussels.

December 1994

After the Soviet Union's collapse, Ukraine is left with the world's third-largest nuclear stockpile. In a treaty called the Budapest Memorandum, Ukraine agrees to trade away its intercontinental ballistic missiles, warheads and other nuclear infrastructure in exchange for guarantees that the three treaty signatories — the U.S., the U.K. and Russia — would "respect the independence and sovereignty and the existing borders of Ukraine."

1994 to 2004

In 10 years as president, Leonid Kuchma helps transition Ukraine from a Soviet republic to a capitalist society, privatizing businesses and working to improve international economic opportunities. But in 2000 his presidency is rocked by scandal over audio recordings that reveal he ordered the death of a journalist. He remains in power four more years.

The 2000s: Wavering between the West and Russia

2004

The presidential election pits Kuchma's incumbent party — led by his hand-picked successor Viktor Yanukovych and supported by Russian President Vladimir Putin — against a popular, pro-democracy opposition leader, Viktor Yushchenko.

In the final months of the campaign, Yushchenko falls mysteriously ill, is disfigured and is confirmed by doctors to have been poisoned.

Yanukovych wins the election amid accusations of rigging. Massive protests follow, and public outcry becomes known as the Orange Revolution. After a third vote, Yushchenko prevails.

January 2005

Yushchenko takes office as president, with Yulia Tymoshenko as prime minister.

2008

Following efforts by Yushchenko and Tymoshenko to bring Ukraine into NATO, the two formally request in January that Ukraine be granted a "membership action plan," the first step in the process of joining the alliance.

President George W. Bush supports Ukraine's membership, but France and Germany oppose it after Russia voices displeasure.

In April, NATO responds with a compromise: It promises that Ukraine will one day be a member of the alliance, but does not put it on a specific path for how to do so.

January 2009

On Jan. 1, Gazprom, the state-owned Russian gas company, suddenly stops pumping gas to Ukraine, following months of politically fraught negotiations over gas prices. Because Eastern and central European countries rely on pipelines through Ukraine to receive gas imports from Russia, the gas crisis quickly spreads beyond Ukraine's borders.

Under international pressure to resolve the crisis, Tymoshenko negotiates a new deal with Putin, and gas flows resume on Jan. 20. Much of Europe still relies on Russian gas today.

2010

Yanukovych is elected president in February. He says Ukraine should be a "neutral state," cooperating with both Russia and Western alliances like NATO.

2011

Ukrainian prosecutors open criminal investigations into Tymoshenko, alleging corruption and misuse of government resources. In October, a court finds her guilty of "abuse of power" during the 2009 negotiations with Russia over the gas crisis and sentences her to seven years in prison, prompting concerns in the West that Ukrainian leaders are persecuting political opponents.

2014: The Maidan revolution and Crimea's annexation

November 2013 through February 2014

Just days before it is to be signed, Yanukovych announces that he will refuse to sign an association agreement with the European Union to bring Ukraine into a free trade agreement. He cites pressure from Russia as a reason for his decision.

The announcement sparks huge protests across Ukraine – the largest since the Orange Revolution – calling for Yanukovych to resign. Protesters begin camping out in Kyiv's Maidan Square and occupy government buildings, including Kyiv's city hall and the justice ministry.

In late February, violence between police and protesters leaves more than 100 dead in the single bloodiest week in Ukraine's post-Soviet history.

Ahead of a scheduled impeachment vote on Feb. 22, Yanukovych flees, eventually arriving in Russia. Ukraine's parliament votes unanimously to remove Yanukovych and install an interim government, which announces it will sign the EU agreement and votes to free Tymoshenko from prison.

The new government charges Yanukovych with mass murder of the Maidan protesters and issues a warrant for his arrest.

Russia declares that the change in Ukraine's government is an illegal coup. Almost immediately, armed men appear at checkpoints and facilities in the Crimea peninsula. Putin at first denies they are Russian soldiers, but later admits it.

March

With Russian troops in control of the peninsula, the Crimean parliament votes to secede from Ukraine and join Russia. A public referendum follows, with 97% of residents voting in favor of secession, although the results are disputed.

Putin finalizes the Russian annexation of Crimea in a March 18 announcement to Russia's parliament. In response, the U.S. and allies in Europe impose sanctions on Russia. They have never recognized Russia's annexation. It remains the only time that a European nation's borders have been changed by military force since World War II.

April

With some 40,000 Russian troops gathered on Ukraine's eastern border, violence breaks out in the eastern Ukraine region of Donbas – violence that continues to this day. Russian-supported separatist forces storm government buildings in cities in the east. Russia denies that its troops are on Ukrainian soil, but Ukrainian officials insist otherwise.

May

The pro-West politician Petro Poroshenko, a former government minister and head of the Council of Ukraine's National Bank, is elected Ukraine's president. He promotes reform, including measures to address corruption and lessen Ukraine's dependence on Russia for energy and financial support.

Sept. 5

Representatives from Russia, Ukraine, France and Germany meet in Belarus to attempt to negotiate an end to the violence in Donbas. They sign the first Minsk agreement, a deal between Ukraine and Russia to quiet the violence under a fragile ceasefire. The ceasefire soon breaks, and fighting continues into the new year.

2015 through 2020: Russia looms

February 2015

The Minsk group meets again in Belarus to find a more successful agreement to end the fighting, resulting in the Minsk II agreement. It too has been unsuccessful at ending the violence. From 2014 through today, more than 14,000 people have been killed, tens of thousands wounded and more than a million displaced.

Together, the annexation of Crimea and the Russian-backed violence in the east have pushed Ukrainian public sentiment toward the West, strengthening interest in joining NATO and the EU.

2016 and 2017

As fighting in the Donbas continues, Russia repeatedly strikes at Ukraine in a series of cyberattacks, including a 2016 attack on Kyiv's power grid that causes a major blackout. In 2017, a large-scale assault affected key Ukrainian infrastructure, including its national bank and electrical grid. (Cyberattacks from Russia have continued through the present; the latest major attack targeted government websites in January 2022.)

2019

In April, comedian and actor Volodymyr Zelenskyy is elected president in a landslide rebuke of the Poroshenko and the status quo, which includes a stagnating economy and the ongoing conflict with Russia.

During his campaign, Zelenskyy vowed to make peace with Russia and end the war in the Donbas.

His early efforts to reach a solution to the violence are slowed by President Trump, who briefly blocks U.S. military aid to Ukraine and suggests to Zelenskyy that he should instead work with Putin to resolve the crisis.

In a phone call with President Trump in July 2019, Zelenskyy requests a visit to the White House to meet with Trump about U.S. backing of Ukraine's efforts to push off Russia. Trump asks Zelenskyy for "a favor": an investigation into energy company Burisma and the Bidens. A White House whistleblower complains, leading to President Trump's first impeachment in Dec. 2019.

Several U.S. officials later testify that Zelenskyy was close to announcing such an investigation, though he ultimately demurs, saying Ukrainians are "tired" of Burisma.

2021: The crisis escalates

April

Russia sends about 100,000 troops to Ukraine's borders, ostensibly for military exercises. Although few analysts believe an invasion is imminent, Zelenskyy urges NATO leadership to put Ukraine on a timeline for membership. Later that month, Russia says it will withdraw the troops, but tens of thousands remain.

August

Two years after his entanglement with former President Trump, Zelenskyy visits the White House to meet with President Biden. Biden emphasizes the U.S. is committed "to Ukraine's sovereignty and territorial integrity in the face of Russian aggression" but repeats that Ukraine has not yet met the conditions necessary to join NATO.

November

Russia renews its troop presence near the Ukrainian border, alarming American intelligence officials, who travel to Brussels to brief NATO allies on the situation. "We're not sure exactly what Mr. Putin is up to, but these movements certainly have our attention," says Defense Secretary Lloyd Austin.

December

President Biden, speaking with Putin on a phone call, urges Russia not to invade Ukraine, warning of "real costs" of doing so.

Putin issues a contentious set of security demands. Among them, he asks NATO to permanently bar Ukraine from membership and to withdraw forces stationed in countries that joined the alliance after 1997, including the Balkans and Romania. Putin also demands a written response from the U.S. and NATO.

2022: Fears of war

January

Leaders and diplomats from the U.S., Russia and European countries meet repeatedly to avert a crisis. In early January, Russian Deputy Foreign Minister Sergei Ryabkov tells U.S. officials that Russia has no plans to invade Ukraine.

The State Department orders the families of embassy staff to leave Ukraine on Jan. 23. NATO places forces on standby the next day, including the U.S. ordering 8,500 troops in the U.S. to be ready to deploy.

Representatives from the U.S. and NATO deliver their written responses to Putin's demands on Jan. 26. In the responses, officials say they cannot bar Ukraine from joining NATO, but signal a willingness to negotiate over smaller issues like arms control.

February

Diplomatic efforts pick up the pace across Europe. French President Emmanuel Macron and German Chancellor Olaf Scholz both travel between Moscow and Kyiv. President Biden orders the movement of 1,000 U.S. troops from Germany to Romania and the deployment of 2,000 additional U.S. troops to Poland and Germany.

Russia and Belarus begin joint military exercises on Feb. 10, with some 30,000 Russian troops stationed in the country along Ukraine's northern border.

The U.S. and the U.K. urge their citizens to leave Ukraine on Feb. 11. President Biden announces the deployment of another 2,000 troops from the U.S. to Poland.

Copyright 2022 NPR. To see more, visit https://www.npr.org.