President Donald Trump holds up a signed executive order to advance construction of the Keystone XL pipeline at the White House in Washington January 24, 2017.

A federal judge has ruled that a lawsuit brought by environmentalists over the Trump administration's approval of the Keystone XL pipeline can proceed.

The decision comes just two days after Nebraska regulators lifted the final regulatory obstacle to the project. It creates a potential roadblock for pipeline operator TransCanada's long-stalled project to transport heavy Canadian crude to U.S. refining hubs.

On Wednesday, U.S. District Judge Brian Morris rejected efforts by the Trump administration and TransCanada to have the lawsuit dismissed. The administration argued that no further environmental reviews were necessary when President Donald Trump approved construction of Keystone XL.

The environmentalists said the State Department and other agencies relied on outdated environmental reviews for the Keystone XL pipeline and did not consider relevant information when Trump issued his executive action in January.

"Once again, the courts are serving as a critical backstop against this administration's attempts to flout the law for the benefit of corporate polluters," said Doug Hayes, senior attorney at Sierra Club, in a statement.