A pipeline leak in northwest North Dakota last week caused the release of 840,000 gallons of oil and wastewater, environmental officials confirmed on Monday.