PORTLAND — A boil water order for the Portland peninsula that had been in effect for 24 hours was lifted just before 9 a.m. on Thursday after water district officials determined that the water was safe.

Michelle Clements, public relations manager for the Portland Water District, said a dozen water samples were collected on Wednesday after a large water main broke on Somerset Street in the Bayside neighborhood. Those samples were tested for contamination and each came back clean, Clements said.

“Anytime we have a break, there is potential for contamination, so this was a precaution,” she said Thursday. “With any break, especially a large break, it can stir up sediment, so some water might be cloudy. Running the tap for a minute or two usually takes care of that.”

The main break was reported at about 7:45 a.m. on Wednesday, prompting city officials to issue the boil order about an hour and a half later.

The order affected about 4,000 homes and businesses and flooded parts of Somerset Street. The East End and Reiche schools were closed on Wednesday. Portland High School students were released at noon.

All schools were reopened on Thursday.

Clements said the district has not determined how much it will cost to repair the main break. The biggest cost, she said, is repaving Somerset Street, which suffered significant damage. That hasn’t happened yet.

The last main break of this magnitude was in 1996, Clements said, when a handful of breaks all occurred at the same time.