President Obama rejected TransCanada’s proposal to build the Keystone XL pipeline on Jan. 18, 2012. The deadline Congress had set for a decision, he said, was “rushed and arbitrary” — the result of Republican maneuvering in Congress to force the president’s hand.

Was Obama thinking about Nebraska when he did it? He probably wasn’t thinking about Nebraska. But Congress’ attempt to rush the president’s decision, and the president’s “Screw you, Congress!” move, had big implications for Nebraska, and the section of KXL that TransCanada’s current plans show going right through the state. The impact of that two-year-old face-off continues to wreak havoc with pipeline proponents’ efforts to push their project forward — most recently, with a Nebraska court ruling this week that threatens to reset the Keystone XL game clock.

The decision cheered those working to stop the pipeline. “I opened a very nice nice bottle of red wine,” said NextGen Climate Action senior advisor Chris Lehane, at a press conference Thursday morning. “I took a sip, read a line, took another sip. I read every line, and I felt pretty good at the end of the process. They no longer have a path in a previously approved state that is critical to their plan. Reading it you can see how even in a state like Nebraska, politics are evolving and changing.”

This is how we got here: Many people who live in Nebraska were not thrilled to discover, when they began getting calls from TransCanada several years ago, that a law passed in 1963 (known as 57-1101) gave companies building oil pipelines in the state the ability to use eminent domain to seize land. The law applied even if they happened to be foreign companies, like TransCanada, which rankled even more.

In 2010, TransCanada sent Randy Thompson, a retired rancher, a notice informing him that if he did not sign an agreement in the next 30 days, it would use eminent domain to force the issue in court. The agreement offered a one-time payment of $18,900 for a perpetual right of way across 80 acres of his land.

At that time, TransCanada hadn’t even managed to secure a permit to build the pipeline in the area. Conspiracy theories abounded. Maybe TransCanada was actually after the water in the Ogallala aquifer, which lay underneath the route. Maybe this was just a land grab — even if the pipeline didn’t get built, landowners argued, the rights could be resold for more than TransCanada was proposing to pay for it. “They didn’t earn this land,” Thompson told a reporter early this year. “They didn’t carry heavy milk buckets and walk through the snow and the slop like my mom did.”

Experiences like Thompson’s had their consequences. In November 2011, the state replaced that 1963 law with a new one, the Major Oil Pipeline Siting Act (aka LB1, or MOPSA, the little law with the terrible acronym). The new law added a buffer of paperwork and report-filing to the pipeline approval process: There would be public hearings, and a requirement to establish how a proposed pipeline route would serve the public interest, and reports reports reports from agencies like the Department of Environmental Quality, the Department of Natural Resources, the Department of Revenue, the Department of Roads, the Game and Parks Commission, the Nebraska Oil and Gas Conservation Commission, the Nebraska State Historical Society, the State Fire Marshal, and the Board of Educational Lands and Funds. Eminent domain could only be used after the path of future oil pipelines had been approved by the Nebraska Public Service Commission (PSC).

The new law would not, however, affect Keystone XL. The reasoning used was that any legislation that could be seen as delaying Keystone XL would be unconstitutional (under the Interstate Commerce Clause) and open the state up to a lawsuit from TransCanada, on the grounds that Nebraska had written the legislation for the sole purpose of stopping Keystone XL. To people who had advocated for MOPSA for the sole purpose that they hoped it would stop Keystone XL, this was not welcome news. But MOPSA was better than no MOPSA.

Then, a little over a year later, Obama rejected the Keystone proposal. He’d consider any new proposals, he said. But this old one was toast. In that moment, Nebraska’s pipeline went from being a done deal, just waiting for presidential approval, to being an undone deal — one that was going to have to petition MOPSA like every other poor schlub of a pipeline dream.

Or that’s how it looked. What actually happened is, the day after the president’s decision, a state senator, a Republican named Jim Smith, introduced yet another law. Smith’s law, LB 1161, would allow pipeline companies to bypass the Public Standards Council and instead take the option of running their plans past the Department of Environmental Quality, an agency that had no standards in place for how to evaluate pipeline impacts, and then onto the governor, a well-known Keystone booster at that point. Once the governor approved a plan, the company was free to use eminent domain to seize land along its route.

LB 1161 was voted in quickly, about a half hour after its final revision, with no chance for public comment on the final draft. A few months later, Smith left on an all-expenses paid trip to see the Alberta Tar Sands as part of a junket organized by the American Legislative Exchange Council. A few months after that, Nebraska’s governor approved TransCanada’s new pipeline route.

The new route no longer passed through Thompson’s land, but he found himself unable to shake the experience. “I am a Republican,” he said in an interview held after 1161 passed. “But, not a very proud one. This has really changed my attitude about politics in general. I’ve lost faith in it, basically, is what’s happened. Casual observers don’t have a clue what the legislature pulled off here.”

So he sued. Thompson and two other people whose property had been threatened by the pipeline, Susan Luebbe and Susan Dunavan, sued the governor, the acting director of the state department of environmental quality, and the state treasurer, on the grounds that the law was unconstitutional. On Feb. 19, the judge in the case, Stephanie F. Stacy, ruled in their favor.

Where does this leave Keystone XL? Now that LB 1161 has been rendered null and void, so is the governor’s approval of Nebraska’s span of the pipeline. Nebraska’s attorney general has said the state will appeal the ruling. TransCanada can also try to win approval for its new pipeline route from the Public Standards Council, which would be contentious (pipeline opponents argue that the new route is selectively ignoring U.S. Geological Service Data that shows that the new path still runs over the Ogallala aquifer) but not impossible.

It would take at least six months before any new plans could work their way through the system that LB 1161 tried to invalidate. The legislators that wrote LB 1161 may also try to pass a new version of the law that could pass constitutional muster.

It’s the law of unintended consequences: Congress’ effort to pressure the president into approving the pipeline fast two years ago instead set off a chain reaction of further delays. Until Nebraska approves a new route, the U.S. State Department will have to wait to make its recommendation to the president on whether a permit for the cross-border pipeline should be approved. While some have hypothesized that Obama might approve KXL before this fall’s midterm elections in order to protect Democratic seats in oil-rich states like Louisiana and Alaska, Nebraska might just be the state that pushes the president to kick the pipeline farther down the road again.