The Obama administration headed to court on Thursday to fight for the moratorium on deepwater drilling it imposed in response to the BP oil spill, while the British oil giant sought to dampen talk it could stop its gushing well this month.

The administration filed an appeal to reinstate the six-month ban it imposed during the investigation of what caused the April 20 drilling rig explosion that killed 11 men and triggered the worst oil spill in U.S. history.

A federal judge stopped the ban last month, ruling in favor of drillers like Hornbeck Offshore Services Inc, who argued the moratorium was too broad, would cost jobs and unfairly punished their industry.

Department of Justice lawyers will argue the ban is sufficiently narrow and necessary to avoid another disastrous spill such as the one that has leaked oil into the Gulf of Mexico for 80 days.

Whichever way the New Orleans appeals court rules, it is unlikely to remove enough uncertainty for deepwater drilling to resume by companies reluctant to act in the absence of final legal and regulatory decisions. But it should help shape the revised moratorium the Obama administration is expected to announce within days.

The hearing is scheduled for 3 p.m. EDT/4 p.m. EDT (2000 GMT).

Ahead of the hearing, BP's New York share price on Thursday was up less than one percent, after rising about 24 percent in the past eight trading days on talk the company was seeking new investors and optimism the worst might be behind the company.

BP sought to stanch some of that optimism on Thursday after a report it could stop the well by July 27, when it is due to report its second quarter income. The target for completing a relief well to stop the flow had been mid-August.

STOPPING THIS MONTH 'IN A PERFECT WORLD'

The head of BP's Gulf Coast restoration unit, Bob Dudley, told The Wall Street Journal stopping the well between July 20 and July 27 could be possible in a perfect world with no interruptions.

He (Dudley) gave that as the very, very best scenario if everything went absolutely superbly according to plan and there are no interruptions but the expectation is that it will be August, a spokeswoman said.

Those perfect conditions would include good weather -- in the middle of the six-month hurricane season that began on June 1 -- and the company said on Wednesday it had begun evacuating workers from four Gulf of Mexico platforms due to a tropical disturbance.

Another serious storm in the Gulf of Mexico could further disrupt efforts to contain the massive oil spill.

Bankers say BP's chief executive, Tony Hayward, is currently on an international marketing drive for its stock, whose price had fallen by around half since the Macondo subsea well blew out.

Singapore state investor Temasek Holdings on Thursday dismissed talk it had held discussions with BP for a strategic stake.

It's speculation, Temasek Executive Director Simon Israel told reporters when asked if Temasek was talking to BP.

Temasek's comment came after Hayward met an Abu Dhabi state investment fund on Wednesday, which followed visits to Azerbaijan and Russia.

The oil seeping into the Gulf of Mexico is wreaking havoc on coastal ecosystems, killing birds, sea turtles and dolphins and risking multibillion-dollar fishing and tourist industries at a time of high unemployment.

It has reached the shores of every U.S. Gulf Coast state, and caused political challenges far beyond the courtroom for President Barack Obama, whose handling of the crisis has been subject to severe criticism despite widespread anger at BP.

We have been asking for more protection since the oil began spewing into the Gulf and we are so frustrated because it seems that BP wants the oil to come on shore, said Tommy Longo, mayor of Waveland, Mississippi, where high tides was washing oil onto the beaches.

Estimates of the leak's severity vary widely, to as high as 100,000 barrels per day.

Pushed by the Obama administration, BP has committed to a $20 billion fund for clean-up and other costs stemming from the spill. Its costs to date have topped $3 billion.

(Additional reporting by Matthew Bigg in Mississippi, Martinne Geller in New York, and Kristen Hays in Houston; Writing by Patricia Zengerle; Editing by Kristin Roberts and Jerry Norton)