Robert Wine, a spokesman for BP in London, said: "We are also looking at opportunities for natural gas exploration and are hopeful of reaching an agreement soon."
A spokesman for Tony Blair, the British prime minister, confirmed the deal, as the prime minister arrived in Tripoli ahead of a five-day tour of Africa.
An energy industry source said that there was confusion over whether it was an oil or a gas deal, which reflected the uncertain nature of energy exploration.
"We are going to sign an oil exploration and prospecting accord on Libyan territory"
Shukri Ghanem, head of Libya's National Oil Corporation
Blair's trip to Libya
"It is primarily gas. But obviously until they start digging and doing tests, they're not quite sure what else they might find. It might be oil, it could well be gas, but primarily it's gas," the source said on condition of anonymity.
Libya, a member of the Organisation of Petroleum Exporting Countries (OPEC), is the African continent's second largest oil producer at 1.7 million barrels per day.
It also has natural gas reserves estimated at 1,314 billion cubic metres.
Mohammed Ali Zainy, an energy economist at the Centre for Global Energy Studies, said Libya could be an important supplier to Europe, which is finding ways to diversify its sources.
"Russia seems to have a problem supplying gas to Europe … Europe is concerned about the security of supply," he said.
Libya is seeking massive investment to boost its energy sector, which saw is development stunted under UN sanctions imposed after a US airliner was downed in 1998 over the Scottish town of Lockerbie, killing 270 people.
But Libya accepted responsibility in August 2003 and agreed to pay $2.7bn in compensation to victims' families, leading to an end to the sanctions.
Libya's agreement not to pursue nuclear, chemical and biological weapons in 2004 led to further interest from international oil companies and increased diplomatic relations with the West.
Since then, mass privatisations have continued to occur in what is a largely government-controlled economy.
BP, which first became involved in Libya almost half a century ago, discovered the giant Sarir oilfield in the Sirte Basin in 1961, marking the start of a rapid expansion of the north African country's oil sector.
In 1971, BP's assets were nationalised by Muammar Gaddafi, who took power in a coup in 1969.