HOUSTON — Halliburton, the global oil service company, announced on Monday that it had written off its remaining investment of $312 million in Venezuela, as oil production in the politically polarized and virtually bankrupt country continues to plummet.

The move had long been expected because the state-owned oil company, Petróleos de Venezuela, known as Pdvsa, had for years been falling behind on paying its bills from companies that maintain and operate its oil and gas wells.

“This is one step further into the collapse of the Venezuelan oil industry,” said Francisco J. Monaldi, a Venezuelan energy expert at Rice University, “because it means oil service contractors, which are absolutely essential to operations, are slowly giving up on the country.’’

Daily oil production in Venezuela, the country with the world’s largest reserves, has plummeted by 200,000 barrels since late last year, to its lowest level in 30 years. That drop has helped raise global oil prices in recent weeks to more than $70 a barrel, and has pushed gasoline prices in the United States to their highest level for this time of the year in three years.