BISMARCK, N.D. — Three environmental groups are suing North Dakota over an air quality permit that allows construction of an $800 million oil refinery about 3 miles (5 kilometers) from Theodore Roosevelt National Park.

National Parks Conservation Association, the Environmental Law and Policy Center and the Dakota Resource Council filed the lawsuit in state court on Thursday, asserting that the state erred when it concluded the proposed Davis Refinery wouldn't be a major source of pollution and wouldn't negatively impact the park.

The lawsuit asks a judge to declare the permit invalid and send the case back to North Dakota's Health Department for further review.

"We must protect the air quality in the national park, which visitors and surrounding community members breathe, and on which the stunning views and fragile ecosystems depend," said Stephanie Kodish, clean air program director for National Parks Conservation Association. "This polluting oil refinery betrays the conservation values of the park's namesake."

The 30,000-acre (12,000-hectare) park is named for the former U.S. president who ranched in the region in the 1880s and is revered for his advocacy of land and wildlife conservation. It's a rugged and breathtaking area of hills, ridges, buttes and bluffs where millions of years of erosion have exposed colorful sedimentary rock layers, and is home to a variety of wildlife including prairie dogs, wild horses and bison. The park is the state's top tourist attraction, drawing more than 700,000 visitors annually.

Meridian Energy Group is developing the refinery to initially process about 27,500 barrels of oil daily, with room for expansion. The company maintains that the plant with modern technology will be "the cleanest refinery on the planet."

"We have great confidence in the engineering we have performed and the work conducted by the permitting agencies," the company said Friday in a statement to The Associated Press.

State Air Quality Director Terry O'Clair on Friday said Health Department staff will be meeting with attorneys next week to discuss the lawsuit, but that he stands behind the state's "very thorough review" of the project. The review took more than a year and generated more than 10,000 public comments.

The lawsuit comes about two weeks after the Environmental Law and Policy Center and the Dakota Resource Council filed a separate complaint with North Dakota regulators requesting a study of the refinery's location. The Public Service Commission is reviewing the complaint.

The refinery also will need state water and wastewater permits, but it can begin building before receiving them. O'Clair said that, in light of the lawsuit, the company would be proceeding at its own risk.

Supporters of the refinery point to its potential impact on the economy. It could create 500 construction jobs and permanent jobs for 200 people in the area, while generating millions of dollars in local property taxes each year. The company said it will announce Monday when it will start construction.