SHANGHAI — A large oil spill in northwest China has heavily polluted a tributary of the Yellow River, and threatens to reach one of the country’s longest and most important sources of water.

China’s state-run news media said late Saturday that a “large amount” of diesel oil had leaked out of a pipeline last Thursday in Shaanxi Province.

The government has not explained why the report of the spill was not released until late Saturday. But Xinhua, the official state news agency, said the leak was caused by construction work and that a crew of 700 people was struggling to contain the damage from what Shaanxi officials said was about 150,000 liters, or about 40,000 gallons, of diesel oil.

The damaged pipeline belongs to the China National Petroleum Corporation, one of the country’s state-owned oil giants and the parent company of PetroChina. The company did not specify on Saturday exactly how much oil was spilled but said that it had shut down the pipeline. The company also said that “much of the leaked oil and polluted silt has already been taken away.” But government officials in Shaanxi province said on Saturday that oil has been detected far downstream from the leak and warned local residents not to use water in the region.