The National Marine Fisheries Service lost its bid to avoid conservation groups’ challenge to the agency’s review of how two deepwater crude oil export terminals in the Gulf of Mexico would affect protected species and their habitats.

Judge Theodore D. Chuang of the US District Court for the District of Maryland denied the government’s motion to dismiss Thursday and rejected its bid to move the case to Texas in the alternative.

Environmental groups in September challenged NMFS’ biological opinion on the effects of the Sea Port Oil Terminal and Texas GulfLink Deepwater Port Project, saying the agency didn’t properly consider …