The Maine Department of Environmental Protection continued working Thursday to clean up thousands of gallons of fuel that spilled in a truck crash Wednesday in Gorham.

The truck spilled all but 600 of the 9,500 gallons of diesel and kerosene it was carrying when it rolled over around 2 p.m. Wednesday at the intersection of routes 114 and 112.

Police are investigating the cause of the crash and are looking for the driver of a car that the truck driver and witnesses said may have contributed to it.

Jessamine Logan, spokeswoman for the DEP, said Thursday that crews had recovered about 7,500 gallons of kerosene and diesel fuel, plus an unknown quantity that was cleaned up with absorbent materials. She said the focus had shifted to measures to help contain the fuel before predicted heavy rain moved into the area early Friday.

Logan said the DEP was working with Gorham Public Works and the state Department of Transportation to build temporary underflow dams in storm water drains that allow water to go through while containing the oil. Clean Harbors Inc. planned to have a crew and a vacuum truck at the scene overnight Thursday to remove oil that collected behind the dams.

The DEP’s Technical Services was in Gorham on Thursday to identify areas where drinking water wells could be in danger of contamination. Water samples will be taken from four residential properties in the coming weeks, but no contamination had been reported Thursday, Logan said.

Logan said DEP employees will work with the transportation department and the town of Gorham to remove contaminated soil starting Monday. That work will include removing grit from all of the catch basins affected by the spill and removing granite curbing to get to likely contamination behind it. A lane closure is expected while that work is done.

Logan said it could take several days to clean up the spilled fuel and assess what damage, if any, was done to wetlands in the area.

The truck, owned by the J.P. Noonan company of Gorham, landed in a ditch and one of its four storage tanks ruptured. The truck’s internal valve system failed, causing all but 600 gallons to spill onto the ground and into nearby wetlands, according to fire and police officials.

The driver, Paul Bird, told police that he lost control of the truck when he tried to avoid a dark-colored vehicle that pulled in front of him. Witnesses gave a similar account to police, said Gorham police Lt. Chris Sanborn. No one was injured in the crash.

Sanborn said state police planned to inspect the truck Thursday to determine whether it had any mechanical problems. Sanborn said J.P. Noonan has a reputation for maintaining its equipment, and has been cooperative.

J.P. Noonan has a “satisfactory” rating from the U.S. Department of Transportation’s Federal Motor Carrier Safety Administration. A satisfactory rating means that a motor carrier has adequate safety management controls to meet federal regulations.

Gorham police also are working with the Cumberland County Sheriff’s Office to determine how fast the truck was going and whether its speed contributed to the crash. Sanborn said it could take as long as a month to determine the cause.

Sanborn is asking anyone who was in the area at the time of the crash to call police if they have any information about the southbound car that entered the intersection ahead of the truck. Police have only a vague description of a blue or black Honda CRV.

Anyone with information is asked to call Gorham police at 839-5581.

“That vehicle may or may not have been a contributing factor,” Sanborn said. “We want to have a conversation with the driver.”

Sanborn said there have been two other accidents at that intersection involving trucks but there are no concerns about the safety of the intersection. In one accident, a truck loaded with hay rolled over. In another accident there, a mobile home slid off the truck that was carrying it.

“The design of the intersection is fine,” Sanborn said. “It’s just a matter of people traveling through at the appropriate speed and yielding properly.”