They struck oil — but not in a good way.

A Brooklyn high-school principal and his teacher wife were shocked when a heating-oil company mistakenly pumped 300 gallons of oil right onto their basement floor — and now, their landlord has sued the bungling company.

“The first week or so, it smelled pretty strong, like being in an oil refinery,” Ruthi Gochnauer, 60, said yesterday. “It was enough to give you a headache.”

Reliable Heating Oil Inc. was supposed to deliver the oil to 142 Cleveland St. last January — but accidentally pumped it into an old oil pipe at the Gochnauers’ home at 132 Cleveland.

Because 132 Cleveland had long ago switched over to gas heat and disabled its oil system, the black gold spilled directly into the home’s unfinished basement.

The couple that rents the Cypress Hills home to Gochnauer and her husband filed a $50,000 lawsuit against Reliable, an upstate company.

“It was not a good day for me,” homeowner Vera Bernier, 58, said yesterday. “I was livid for someone to make such a horrible mistake.”

The city requires the contaminated dirt be cleaned up, a task that could cost almost $60,000, Bernier said, adding that Reliable was helpful immediately after the spill but split once expenses mounted.

“That’s when they walked away. Now the city is holding me responsible for cleaning up the oil,” Bernier fumed.

Jim Gochnauer, 59, the principal of a local Christian high school, said Reliable owes him about $200 because his electric bill spiked when the company ran big industrial fans for months to blow away the oily stench.

Because most of the basement had to be dug up in order to cart away the oil-soaked soil, the Gochnauers were forced to pile their belongings into a small section of the basement.

“Now when you go down to find something it’s like ‘I wonder where everything is,’ ” Ruthi said.

Vinny Burns, owner of the heating-oil company, acknowledged that a mistake was made but insisted that everybody would get paid back.

The only holdup is that his insurance company wrongly sold him a policy that doesn’t cover incidents like this, he said.

“It’s a big whole mess, obviously,” he said. “It’s all going to get taken care of. It’s just taking a while because of the lawyers.”

Gochnauer said she and her husband stayed in the “cold and smelly house” because they feared looters would break in.