At the end of 2015, managers at Rosneft, the Russian state-controlled oil firm, sounded the alarm to their bosses about the company's investments in Venezuela.

Rosneft's local partner, Venezuelan state oil company PDVSA, owed it hundreds of millions of dollars, according to internal documents, and there seemed no prospect things would get better.

'It will be like this for eternity,' a Rosneft internal auditor wrote in an email to a colleague in November 2015, complaining there was no progress in getting PDVSA to explain a $700 million hole in the balance sheet of a joint venture.

Russia sank an estimated $9billion into the Venezuelan economy via joint projects between its state-owned oil company Rosneft and its South American counterpart, PDVSA (pictured)

The email was among scores of internal Rosneft communications - including presentations, copies of official letters, memos and spreadsheets - reviewed by Reuters. They cover the firm's operations in Venezuela between 2012 and 2015.

It was a period when other international oil companies had either quit the country or were freezing new onshore investments, worried about the policies of the populist socialist administration.

But Rosneft, majority owned by the Russian state, doubled down, increasing its stakes in joint ventures with PDVSA and lending more, the documents show.

Rosneft was standing by its Venezuelan partner just as the Kremlin was supporting leader Hugo Chavez and his successor as president, Nicolas Maduro.

Rosneft has poured around $9 billion into Venezuelan projects since 2010 but has yet to break even, Reuters has calculated, based on Rosneft's annual reports, its public disclosures and the internal documents.

The Rosneft documents also reveal:

The Russians believed they were owed hundreds of millions of dollars from their joint ventures with PDVSA

Oil output at the joint ventures was far lower than projected

The joint ventures struggled to get hold of basic drilling equipment

The Russians believed PDVSA spent millions of dollars from one joint venture on 'social projects' in a remote area where just a few hundred people lived

Managers brought the problems to the attention of Rosneft's chief executive, Igor Sechin, who ordered measures to right the ship

Since late 2015, the end of the period covered by the documents, some of Rosneft's problems have eased because it has taken greater shareholder and operational control of its interests.

But it remains deeply invested in a company and a country that are in crisis.

The reason Rosneft kept doubling down on its bet was political, according to two people close to the firm and two others with links to the Venezuela projects.

State-owned Rosneft was expected to help prop up Moscow's allies in Caracas, these sources said.

'From the very beginning it was a purely political project. We all had to contribute,' said an executive at a Russian oil firm that partnered with Rosneft in Venezuela.

The Russian who oversees this strategic business relationship is one of President Vladimir Putin's closest lieutenants: Rosneft Chief Executive Igor Sechin.

The two men have known each other since at least the early 1990s when they worked in the mayor's office of their native St Petersburg.

When Putin went to Moscow to become a mid-ranking official in the presidential administration, Sechin went with him.

'I liked him,' Putin told authors of a book about his life. 'When I moved to Moscow, Sechin asked to come with me. I took him.'

A bust of Hugo Chavez greets visitors to Rosneft's offices in Caracas. Sechin often asks to see messages to Maduro before they are sent and adds the phrase: 'Viva la Revolucion!' a former Rosneft employee said.

Russia views its relationship with Caracas as a way to project power into Washington's backyard, according to Alexander Gabuev, a senior fellow at Carnegie Moscow Center, a think tank.

Venezuela has the world's largest crude oil deposits but poor management of oilfields and the supply has led to the economy collapsing

Venezuela is a big buyer of Russian weapons. The billions of dollars that Rosneft has invested in Venezuela are an added incentive for Moscow to keep standing by its ally.

The story of Rosneft's troubled partnership comes at a time of deepening crisis inside Venezuela's giant oil company.

The country's fortunes are closely tied to those of PDVSA, which accounts for 90 percent of the nation's export revenues.

The Rosneft documents provide fresh evidence of long-term mismanagement at PDVSA, helping explain an economic collapse that has left millions struggling to eat.

U.S. Secretary of State Mike Pompeo said on March 11 Rosneft continued to buy crude oil from Venezuela and to 'throw a lifeline to the regime.'

But Kremlin spokesman Dmitry Peskov said Rosneft was driven by the interests of its shareholders. He denied the Kremlin applied pressure on the firm to invest in Venezuela.

'First and foremost, Rosneft works as a commercial company in all corners of the world, and it works seeking commercial profit. Therefore this is what they do in Venezuela,' Peskov said in reply to questions from Reuters.

'Naturally such major projects are planned for the long term.

As for assessments of the profitability of the projects, that's for the company itself, it's not a question for us.'

Neither Rosneft nor PDVSA responded to requests for comment for this article.

MISSING PARTS AND MISSED DEADLINES

In September 2012, at a drilling site in the Orinoco basin, Rosneft's Sechin filled a jar with crude oil and lifted it into the air to mark the moment his firm joined the ranks of global oil majors.

Rosneft was part of a Russian consortium that had acquired a 40 percent share in Venezuela's Junin-6 oilfield. PDVSA held the other 60 percent.

Rosneft already pumped oil from its home fields in Siberia; now it had an overseas presence too, tapping into some of the world's biggest crude oil reserves on the banks of the Orinoco River.

'Today is indeed an historic day,' Sechin told Russian state television at the ceremony to mark the start of production. 'Russian companies have now proved their right to be among the leaders of the global oil sector.'

Yet soon after Sechin spoke, Rosneft's foray into the Orinoco basin was running into problems, the documents reviewed by Reuters show.

In November 2012, without asking its Russian partners, PDVSA shut down one of the four drilling rigs at Junin-6 and removed it, a report by the Russian consortium found that year. Local people staged protests that further blocked work. By the end of 2012, just six wells had been drilled, far short of the project's target of 47.

Rosneft (logo pictured) was expected to help prop up PDVSA as part of a 'political project' to protect Maduro's socialist government, insiders said

Spare parts for drilling at Junin-6 were procured from a PDVSA unit called Bariven; but getting equipment from Bariven took 10 to 18 months, according to the documents. Drilling rigs were not operating 37 percent of the time.

It took on average 49 days to drill a single well, instead of the anticipated 22 days. PDVSA did not respond to questions about the delays.

Junin-6 production forecasts were cut. Rosneft had said in September 2012 that the field would deliver 20,000 barrels per day by the end of the year. In fact, over the whole of 2012 it yielded only 21,400 barrels.

Three years on, there was little sign of improvement. A Rosneft report covering the first three quarters of 2015 cited well construction 'of an unsatisfactory quality' and 'non-optimal trajectories' of wells.

By the end of 2015, the forecast for peak oil output from Junin-6 had been slashed from 450,000 barrels per day to 250,000 barrels per day. Rosneft's flagship project had lost its lustre.

Problems remain across the Orinoco Basin, according to union leaders who spoke to Reuters.

They said that in fields east of Junin, only a handful of the dozens of drilling rigs are working at any one time.

Workers complain they don't have basic equipment such as boots, gloves and helmets. The situation in PDVSA offices is no better.

Paper is in short supply. In a vain effort to stem a worker exodus, some HR departments display 'No resignation' signs.

Nor is life in Venezuela easy for Rosneft staff. There is often no mains water in the high-end Caracas district where they live, said a Russian who knows families there.

A couple of times a week, a water tanker arrives and fills up containers in each apartment.

Two of Rosneft's Russian partners in Junin-6 dropped out. The smaller Surgutneftegaz decided to quit the project in November 2012. In December 2014, Russia's second biggest oil firm, Lukoil, announced it too was dropping out.

'Looking back, a lot of people at Lukoil breathed a sigh of relief that they didn't have to pile billions into Venezuela,' said an executive in the Junin-6 consortium.

Surgutneftegaz did not respond to a request for comment. Lukoil declined to comment.

Rosneft bought out the Surgutneftegaz and Lukoil stakes for upward of $300 million, analysts estimated, deepening its exposure to Venezuela.

It also acquired a stake belonging to TNK-BP when it purchased the Russian-British firm in a $55 billion deal in 2013.

That left Gazpromneft, the oil unit of state-owned gas firm Gazprom, as Rosneft's sole remaining Russian partner in Junin-6. Gazpromneft did not reply to Reuters' questions.

A wholesale supermarket after it was looted by Venezuelans who have been been deprived of food and suffered through a week-long electricity blackout

Rosneft also had four smaller oil projects with PDVSA at that time. All were experiencing problems during this period, the Rosneft internal reports show.

Two of the projects, Carabobo and Petromonagas, are in the Orinoco basin; Boqueron is in the east near the Atlantic coast; Petroperija is on the Caribbean coast.

Rosneft internal reports from 2015 concluded that crude flow rates envisaged in the contract for the Carabobo fields were 'not achievable.'

At Petromonagas, poor quality work caused drilling delays. At Petroperija, production was falling and the joint venture did not have the cash to buy essential pumping equipment.

At the Boqueron field, a broken compressor, a device to raise gas pressure, could not be fixed because the joint venture's bank account was empty.

MONEY TROUBLES

If getting oil out of its projects was a struggle for Rosneft, so was extracting revenue, the documents show.

The Russian consortium's report into operations at Junin-6 in 2012 found that PDVSA had taken $12 million from the Junin-6 budget, without Rosneft's agreement, for social spending on local people.

Only 350 people lived in the area covered by the concession - some 447 square kilometers of hilly scrubland on the northern bank of the Orinoco River.

In the second half of 2014, Rosneft ordered an audit of the Junin-6 project to check for 'distortion of financial accounting' and 'unjustified expenditures.' Reuters couldn't determine that audit's conclusions.

Rosneft managers ordered the company's own auditors to investigate money flows between PDVSA and the Petromonagas, Petroperija and Boqueron joint ventures, internal documents relating to the audit show.

The audit concluded that PDVSA had understated earnings from Petromonagas oil sales by some $700 million. PDVSA challenged this figure, another document shows, and it was revised to $500 million.

In a document dated April 30, 2015, Sechin, Rosneft's chief executive, approved the findings of the audit, and a plan to protect Rosneft's investments with a series of measures to be implemented by the end of May that year.

The measures included installing metering stations to monitor how much oil was being pumped to customers, and therefore how much money the ventures should be earning.

Rosneft wanted an independent assessor to track how the joint ventures spent money. And it wanted PDVSA to stop hiring its own subsidiaries without signing a contract. Reuters couldn't determine whether the measures were put into action.

A few months later, in October 2015, Rosneft First Vice President Eric Liron reported to Sechin that there was still disagreement with PDVSA on settling accounts with the joint ventures.

Nicolas Maduro is clinging to power in the South American nation, which used to be the continent's richest, despite opposition from Juan Guaido

Liron wrote in a memo to Sechin: 'As of 15.08.2015, PDVSA is in technical default.'

Months of efforts to get the money - in which Rosneft's Venezuela office and senior executives at headquarters engaged in negotiations with PDVSA officials - went nowhere.

The Rosneft internal auditor stated in the November 2015 email to his colleague that the problem was 'unresolved because of the poor financial health of our partner' - a reference to PDVSA.

Discussing a proposal to push the internal deadline for fixing the problem to a later date, the auditor asked sardonically what would be the point.

'Will it (PDVSA) return to health by then, or will it die and the question will no longer be relevant?' he wrote in the same email.

The auditor left Rosneft in 2016, according to his LinkedIn profile. He did not respond to a message seeking comment.

Rosneft was supposed to receive its share of the revenue from oil sales in the form of dividends. As of the fourth quarter of 2015, Rosneft internal presentations showed that the company was owed dividends from three of its joint ventures.

The total shortfall was $337 million. The presentations listed among the strategic aims of each of the three projects: 'Receiving unpaid dividends' from PDVSA.

Since the period covered by the documents, Rosneft has acted to take greater control of its investments, for example by bringing in its own contractors.

Rosneft says PDVSA has paid off much of its debt. In a financial report released on Feb. 5, 2019, Rosneft said the loans it extended to PDVSA, which had totalled about $6.5 billion, were now down to $2.3 billion.

But serious challenges remain.

Rosneft's own reports and assessments by energy analysts show the company's projects in Venezuela are today still producing less oil than originally anticipated, with development plans either shelved or behind schedule.

Rosneft's flagship joint venture in Venezuela, the Junin-6 field, is still stuck in the exploration and test production phase, Rosneft wrote in its 2017 annual report.

An executive at Russian partner Gazpromneft went further, saying the project is now 'commercially pointless.' The executive did not elaborate.

Rosneft did not reply to Reuters questions about the commercial viability of the project.