CAPE CANAVERAL, Fla.  Senator Barack Obama said Saturday that he would reluctantly consider accepting some new offshore oil drilling in the Gulf of Mexico in exchange for stripping oil companies of tax breaks and extending several tax credits to spur the search for alternative fuels.

At the same time, Senate Republicans appear to have dropped their insistence on opening the Arctic National Wildlife Refuge to drilling.

Mr. Obama has until now opposed any expansion of lands for offshore drilling. But in a news conference here, he noted that there had been “very constructive” talks between Senate Republicans and Democrats on this issue in recent days, applauding a plan unveiled by a group of Republican and Democratic senators to permit drilling while supporting an effort to convert most vehicles to using alternative fuels in 20 years.

“If we come up with a genuine bipartisan compromise, where I have to accept some things that I don’t like in order to get energy independence,” Mr. Obama said, “that’s something I will have to consider.”