(Adds incoming President's refining plans in last paragraph)

MEXICO CITY, June 24 (Reuters) - Mexican state energy company Pemex is unlikely to produce any commercially viable motor fuels at its new Olmeca refinery before the end of the year, five sources said, despite pressure that it should be ready before the outgoing president's term ends. President Andres Manuel Lopez Obrador, a resource nationalist, inaugurated the 340,000-barrel-per-day refinery in July 2022 in his home state Tabasco, billing it as crucial to energy self-sufficiency for Mexico. However, delays at the refinery in the port of Dos Bocas, whose cost has more than doubled to $16.8 billion, means it will be up to his successor Claudia Sheinbaum to try to make the dream a reality when she takes office on Oct. 1.

As recently as last Thursday, Pemex CEO Octavio Romero insisted during an industry event the refinery would "work at full capacity next month."

Now, five sources familiar with the operations told Reuters that it was impossible to meet these targets and that progress had been exaggerated ahead of the June presidential election.

Neither Pemex nor the president's office responded to requests for comment.

Two sources with detailed knowledge of the operations said engineers were still working on individual parts of the refinery and will then face the even bigger challenge of linking them.

One of the sources, an engineer, described this last step as a hugely complex and "agonizing" process of trial and error that takes months.

The other source, also an engineer, said that in the most optimistic scenario the first of two production lines of the refinery would be ready between October and November.

"Technically and operationally, the refinery is fine so far but the problem is the expectations that have been created," the source said.

He added that the information shared publicly by officials "doesn't take into consideration more technical criteria" around how a refinery works.

Pemex officials had sought to demonstrate the refinery was operational by bringing a cargo of high-sulfur diesel to the Olmeca refinery to be turned into ultra-low-sulfur diesel but this was not produced from crude oil as is the plan.

Parts that still need work include the fluid catalytic cracking plant, where heavy petroleum fractions are converted into lighter products, and the hydrodesulfurization plant where sulfur is removed under high pressure and high-temperature.

Another challenge for engineers will be the coker plant that converts and processes residual fuel oil, the source said.

NATIONAL PRIDE

The refinery is by far the biggest of various energy projects running behind schedule and the two sources said Mexico would not follow through with hundreds of thousands of barrels of crude oil export cuts but continue importing diesel and gasoline instead.

None of the sources said the construction of the refinery was inherently flawed and that it is too early to determine how the delay would affect public finances because refining margins are not known.

Independent experts have long argued Pemex, a matter of national pride for most Mexicans, should instead have invested in much more profitable exploration and production instead of refining.

There were also concerns over just how rushed the project was, sources said, and how its progress had been exaggerated for political reasons which has disrupted markets. In March, Pemex ordered its trading arm to cancel exports of 436,000 barrels of crude oil it said it needed for the domestic refineries. In April, it announced export cuts of another 330,000 barrels, only to backtrack shortly afterwards. Then, Pemex requested only 16,300 bpd of crude oil for the new Olmeca refinery as of mid-May - just about 1% of what the state company pumps and less than 5% of its capacity.

One of the sources, a trader familiar with the export schedule, said the refinery was so delayed that it was now not even able to take in such a small load.

Despite being a crude oil producer, Mexico imports most of its motor fuels. Last year, it exported crude oil worth more than $31 billion and imported various types hydrocarbon products - including gasoline and diesel - worth just under $31 billion.

Lopez Obrador, who has staked his legacy on rescuing debt-laden Pemex and making Mexico self-sufficient in energy, had promised shortly after taking office in late 2018 that the refinery would be constructed in a record time of three years.

Proposals from several private companies were deemed too expensive, with Lopez Obrador arguing that savings from his fight to root out corruption would make the refinery cheaper. The final price tag, however, will be much higher than those proposals.

In another setback for his agenda, new coker plants aimed at boosting the efficiency of two older refineries, Tula and Salina Cruz, are also still not ready, two separate sources said.

Pemex's other ailing refineries - including one that went online 118 years ago - struggle to efficiently process the heavy sour Maya crude Pemex pumps. They leave the country with volumes of highly polluting fuel oil that are so large, they exceed gasoline and diesel production.

Sheinbaum

plans to invest

in Pemex' refineries to reduce output of low-value fuels and byproducts, including the fuel oil state utility CFE uses to generate power, and instead boost production of motor fuels, one of her advisors said.

(Reporting by Adriana Barrera, Stefanie Eschenbacher and Ana Isabel Martinez Editing by Stephen Eisenhammer and Marguerita Choy)