Image copyright ABC Image caption Residents stood in queues past midnight on Wednesday to stock up on bottled water

Residents of a Texas city have been warned by officials not to drink or bathe in the tap water because of a chemical contamination.

Wednesday's advisory applies to more than 300,000 people in Corpus Christi on the Gulf of Mexico coast.

Boiling, freezing, filtering, adding chlorine or other disinfectants, or letting the water stand will not make the water safe, officials say.

The contaminants have not yet been named, but are petroleum-based.

"Only bottled water should be used for all drinking, beverage and food preparation (including baby formula and juice), making ice, brushing teeth, washing dishes or clothes, washing hands, and bathing until further notice," said a press release from the city.

On Wednesday night long queues formed at grocery stores of shoppers stocking up on bottled water.

Image copyright AP Image caption Grocery stores quickly ran out of bottled water

Image copyright AP Image caption Shelves were completely empty by Thursday

Officials believe the contamination was caused by a faulty valve in the city's industrial district, which caused a "back-flow incident", leaking contaminants into the drinking water supply.

It was first reported at around 18:00 local time by a worker at an industrial property who noticed a sheen in the water while washing his hands.

Mayor Dan McQueen has emphasised that the city's water filtration system did not fail.

Officials will announce new information after test results return from Austin, the state capitol.

Classes have been cancelled at some schools, but others are continuing with lessons.

The schools that remain open are handing out bottled water and hand sanitiser while supplies last.

Media playback is unsupported on your device Media caption Flint resident Melissa Mays: 'Our hair fell out'

Corpus Christi is not the only US city to have suffered from tainted drinking water in recent years.

The biggest scandal is ongoing in Flint, Michigan, where officials polluted the water with lead after switching sources from Lake Huron to the Flint River.

Contaminations have also turned up in other major cities including Charleston, West Virginia; Washington DC; and Jackson, Mississippi.

The Texas town with no water