Exxon Mobil and Baghdad have reached agreement for the U.S.-based company to be paid in oil for work on the huge West Qurna-1 oilfield, after months of negotiations over contract terms, an Iraqi oil official said.

The foreign oil companies involved in Iraq's oil expansion generally prefer to be compensated for capital expenditure and service fees in oil, because cash payments are more complicated to arrange.

BP , which leads the Rumaila project, and Italy's Eni , leader of the Zubair project, had signed up to Iraq's oil sales agreement from the outset, the first step towards being paid in crude.

Exxon and minority partner Royal Dutch Shell held out as they sought to tighten up some contractual loose ends, said an industry source.

After lengthy negotiations, the parties have reached an agreement, in which the world's largest publicly traded oil company also will get paid in crude, the Iraqi official said. Exxon and Shell spent $910 million on West Qurna-1 last year and were repaid $470 million in cash.

In principle there is agreement, although there is nothing in writing yet, he said by telephone from Baghdad. Exxon asked us to rephrase some of the wording, which in general will not affect the provisions of (State Oil Marketing Organization) SOMO's oil export agreement.

Iraq has signed service contracts with international oil companies targeting a total production capacity of 12 million barrels per day by 2017. But industry observers say infrastructure problems and logistical bottlenecks are likely to limit their output to about half that level.

Under the terms of Iraq's service contracts, it is crucial for companies to be paid on a timely basis for their projects to be profitable.

The U.S. oil and gas major has angered Baghdad by signing an exploration deal with the Kurdistan Regional Government (KRG), which the central government considers illegal.

The KRG announced in November the signing of a deal for six exploration blocs with Exxon, the first major oil company to deal directly with the Kurds in northern Iraq.

Exxon Chief Executive Rex Tillerson said last week the company was committed to working in both areas of the country.

Exxon could not be reached for immediate comment.

(Editing by Daniel Fineren and Jane Baird)