(Photo: Andrew Burton/Getty Images)

Last week, after more than seven years of intense debate, the Obama administration definitively rejected the Keystone XL pipeline. Even for Washington, this was a long-running debate, especially considering the controversy was mostly symbolic. After all, a 2014 State Department analysis found the pipeline wouldn't make much of a difference to greenhouse gas emissions, and Republicans who supported the pipeline knew they were unlikely to be able to override President Barack Obama's veto.

So how exactly did this political battle play out? Below, we put together a timeline of major events in the Keystone XL's review. You'll see legal machinations by the pipeline's supporters in Congress, and powerful protests by environmental groups. Over the past several years, polls have found that a majority of Americans supported Keystone XL's construction. Ultimately, however, it was the environmental message that won Obama's vote.