FAIRHAVEN, Mass. (AP) _ A tanker truck overturned and spilled thousands of gallons of gasoline that closed a major highway and prompted residents to evacuate their homes for several hours early Monday.

The truck overturned late Sunday on Interstate 195, and the highway's two eastbound lanes were closed between Fairhaven and nearby New Bedford.

Residents left 25 nearby homes as a precaution and stayed away for several hours.

``There was the... danger of explosions so I woke up the children and we had to leave,'' Mary Anne Polchlopek told WCVB-TV.

Some of the 9,000 gallons of fuel that spilled reached a stream feeding a pond that supplies Fairhaven's water, but collection booms placed in the stream prevented contamination of the town's drinking water, said Mark Merchant, a spokesman for the U.S. Environmental Protection Agency in Massachusetts.

However, a wetland area near the spill will require an extensive cleanup, said Teresa Barao, a spokeswoman for the state Department of Environmental Protection.

Police said the cause of the accident remained under investigation. Truck driver Harry Eggleston, 54, was taken to a Boston hospital for treatment but his injuries were not believed to be life-threatening, authorities said.

Fairhaven firefighters spread foam on the spill to safeguard the area, and residents were allowed back in their homes Monday morning.

Authorities reopened one highway lane on Monday afternoon, said State Police Sgt. Edward Principe.

The trucking company, West Bridgewater-based J.P. Noonan Transportation, agreed to pay for the cleanup, Barao said. A woman who answered the phone at the company's headquarters said the company would not comment.