Maryland Gov. Martin O’Malley said he made a “tactical mistake” in a radio ad linking his Republican opponent, Bob Ehrlich, to the Gulf oil spill.

The ad in question begins by referencing the thousands of gallons of oil spilling into the Gulf Coast, and alleges Ehrlich is a lobbyist for big oil.

“We should not have mentioned the oil spill was going on in that ad,” O’Malley said on a WTOP morning show Thursday. He said the reference “allowed the former governor to claim that we were making claims that he was associated with BP, which we never have.”

The ad airs a recording of Ehrlich seven times saying “Drill, baby, drill,” which the former governor says he uttered when imitating his former lieutenant governor, Michael Steele.

“When 80,000 gallons of oil spilled in South Baltimore, Bob Ehrlich was the lobbyist representing the oil company,” a woman’s voice says in the ad, referring to a 2008 spill. The speaker’s statement is sandwiched by Ehrlich’s recorded line.

“As oil coats the Gulf Coast, that’s the voice of big oil lobbyist Bob Ehrlich,” she says.

Ehrlich is not a registered lobbyist, but O’Malley alleges that Ehrlich’s work with his law firm — which has represented several oil companies (not BP) — amounts to lobbying.

“We never accused him of being a registered lobbyist, we only accused him of being a lobbyist,” O’Malley said in defense of his ad on Thursday. “Most lobbyists I know have the decency to register.”