How does a refinery work?
The industrial engine that guarantees essential products
There are products that are part of our daily lives, even if we aren't fully aware of where they come from. The fuel that powers a plane, the asphalt on our roads, the clothes we wear, medical supplies, and even the electronic devices we use to connect with one another multiple times a day all share the same story: they've all been through a refinery.
Today, oil refining provides 97% of the energy consumed by transportation in Spain. Moreover, around 50% of the raw materials used by the chemical industry depend on refining, impacting sectors such as automotive, defense, and advanced materials. Understanding how a refinery works is much more than getting into the technical details. It means understanding a key piece of our economy and our daily lives.
Where crude oil comes from: a refinery's raw material
In Spain, 60% of the crude oil reaching our refineries comes from the Americas, while around 30% from Africa. Only 7% comes from the Middle East.
This geographical distribution is no coincidence: it is the result of a supply diversification strategy that reduces dependence on any specific region, providing greater stability against international market tensions or disruptions on critical routes.
Crude oil arrives at industrial complexes mainly by ship or via pipeline, depending on the geographical location of each facility. To understand the entire pre-refinery process, from formation to transportation, you can refer to our blog article on how oil is extracted.
This raw material has hundreds of varieties, each with different chemical compositions, densities, and sulfur contents.
This diversity provide us with a structural advantage thanks to our ability to process over 100 different types of crude oil, made possible through the investments and upgrades carried out at our industrial complexes.
Once the crude oil arrives at our facilities, the least visible yet most crucial phase begins: its transformation. And doing it right is, quite literally, a true industrial art.
Inside a refinery: stages of the process
Once the raw material has arrived at our refineries, treatment processes begin. This is the first step in refining the crude oil to obtain its wide range of derivative end products.
The heart of any refinery is the distillation tower. Standing dozens of meters high, this vertical structure functions much like a building with a different product on each floor.
The crude oil is heated to approximately 360 °C and introduced into the column. Each hydrocarbon has a different boiling point. The lightest ones rise to the top of the tower, while the heavier ones remain at the bottom.
Thus, from top to bottom, various components are separated: liquefied petroleum gases (LPG), naphthas (feedstock for gasoline and the petrochemical industry), kerosene, gas oils, and heavy oils that will ultimately be processed into asphalt, lubricants, or industrial fuels.
A barrel of crude oil yields much more than just fuel. It also produces intermediates used to manufacture tires, packaging, textile fibers, and construction materials.
Distillation is just the first step. In a modern refinery, many of the fractions obtained then pass through conversion units. Here, processes are triggered to break down large molecules into lighter, higher-value products, or to reconfigure molecular structures to improve final quality.
This is where what is known as a conversion scheme comes into play. It's a production scheme used at our refineries that allows us to extract a higher proportion of high-demand products, such as gas oil and kerosene, from heavy fractions that would yield much less value in less advanced refineries.
This technical difference has highly practical consequences: the exact same barrel of crude oil yields completely different results depending on the sophistication of the facility processing it.
Distillation towers and all surrounding units operate 24 hours a day, 365 days a year.
This continuous process is constantly monitored by highly skilled teams operating in advanced control centers. Automation and digitalization have significantly boosted the efficiency and safety of these operations, though the human factor remains irreplaceable.
Our five industrial complexes in Spain do not operate separately from one another. They operate as a single interconnected unit, coordinated in real time. This allows us to reallocate production based on market demand, optimize facility utilization, and respond with agility to unforeseen changes. This integration is a competitive advantage in and of itself, one that few refining networks in Europe can replicate.
Keeping this machinery running non-stop, with such precise coordination and on this massive scale, requires something rarely mentioned when discussing refineries: an enormous maintenance effort. It requires months of advance planning and execution with near-surgical precision.
Planned shutdowns: an opportunity to upgrade refineries
A refinery is a machine of extraordinary precision. And like any machine, it requires maintenance. However, the maintenance of an industrial complex of this scale is not a matter of hours or days. Shutdowns last for months, involving hundreds of people working simultaneously and according to a plan drawn up well in advance.
Maintenance shutdowns are scheduled periods in which the operation of certain units is stopped to carry out inspections, repairs, equipment replacement, and technological upgrades. They are mandatory from a regulatory perspective, essential for safety, and strategic from an industrial point of view.
The scale of these operations is considerable. A maintenance shutdown at one of our complexes can involve between 500 and more than 3,000 people working every day for weeks: engineers, maintenance technicians, welders, instrumentation specialists, and contractors. In practice, each shutdown is an engineering project in its own right.
And they are more than just inspections: every shutdown is also an opportunity to implement upgrades. This includes new technologies, process upgrades, and systems that boost energy efficiency or expand production capacity. In that sense, a well-executed shutdown is not an operational disruption: it is an investment in continuity and future competitiveness.
This mindset of investing in our facilities, even when the environment calls for caution, is what has defined Spanish refining in recent decades. And the contrast with what has happened in the rest of Europe is remarkable.
Betting on the future while others walked away: our commitment to Spanish refining
To understand the current state of refining in Spain, we must look at what has happened across Europe over the last 15 years.
Since 2009, about 35 refineries in Western Europe (about one in four) have closed or been transformed to stop processing crude oil.
This represents a nearly 20% reduction in European refining capacity. The reasons are well known: tight refining margins, regulatory pressure, and above all, the decision by many operators to not invest in modernizing their facilities in an environment of uncertainty.
As a result, Europe is now a net importer of kerosene and gas oil. In an unstable geopolitical context, this dependency has direct consequences for the continent's energy security.
In contrast to this trend, Spain — and Repsol in particular — made a different decision. While other European operators closed down or divested, we maintained and expanded our industrial commitment.
In fact, over the past decade, we have invested approximately €1 billion per year in modernizing our industrial complexes. This strategic and countercyclical commitment was driven by the conviction that refining would remain an essential industry.
And this commitment has yielded tangible results.
We are capable of processing over 100 types of crude oil with different densities and sulfur contents, providing us with a responsiveness that less flexible refineries simply lack.
Our deep conversion schemes extract from every barrel a greater volume of the products most needed by the economy. Together, our five complexes in Spain refine approximately 38 million tons of crude oil per year (over 60% of the national total), producing roughly 45% of the kerosene consumed in Spain and 65% of its gas oil.
Kerosene deserves special attention. The capability to manufacture it in Spain and to increase that production when circumstances demand is directly linked to the concept of energy independence.
As a reliable operator, we have a responsibility to guarantee the supply of products required by both our market and our customers.
Kerosene production is very important for the Spanish economy, which relies heavily on aviation and the tourism sector, particularly during the summer months.
Over the past two months, we have successfully invested in and adapted our refinery logistics to boost our historic kerosene production. We are set to increase our kerosene output by 25% compared to our levels three months ago in February. Thanks to our investments, starting in May we will be able to produce 465,000 m³ of jet fuel per month. Consequently, not only will we be able to supply our customers, but we'll also be positioned to provide additional volume in the event of supply disruptions from other operators in the Spanish market.
Reducing import reliance for domestic aviation fuel supply is a strategic advantage, especially critical during periods of global market tension. Furthermore, we continue working to strengthen this production capacity, aiming to boost kerosene and gas oil output by 15–20% to help secure an even greater margin in Spain's strategic reserves.
The sector as a whole has matched this commitment: according data form the Spanish Fuel Industry Association (AICE), Spanish refineries have invested around €27 billion over the past 25 years. This figure speaks volumes about the sector's industrial commitment to the country.
Yet, the story does not end there. This same ability to stay ahead of the curve and not rest on our laurels is what is driving our industrial complexes to evolve into something that goes far beyond crude processing.
The refinery of the future: efficiency, circularity, and new products
A 21st century refinery isn't just a facility that processes crude oil. It is an industrial platform in continuous transformation, capable of taking on new raw materials to manufacture new processes and products without abandoning its essential function.
In that evolution, efficiency takes center stage. Digitalization and automation have made it possible to optimize energy consumption in processes, reduce losses, and improve operational decision-making in real time.
The concept of an autonomous plant — facilities that integrate advanced control systems, data analysis, and artificial intelligence to optimize their own operation — is a direction in which we are already actively working. These are plants that incorporate technology, AI, and automation capabilities to assist and improve decision-making — but always at the service of operators, who remain the key element of the system
In this sense, an autonomous plant is deeply human in its design and supervision: rather than replace people, it enhances what they do. Just like the autopilot in aviation, these technologies do not take the place of highly skilled professionals, instead providing them with ongoing support to operate with greater safety, efficiency, and accuracy.
At the same time, the circular economy is redefining what goes into a refinery. Along with conventional crude oil, our industrial complexes already process raw materials of residual origin: cooking oils, biomass waste, agri-food waste, and used plastics that would otherwise end up as waste and which here are converted into high-value products. This change does not require building new infrastructure from scratch: the same industrial platform that processes crude oil can be adapted to process these new raw materials, which multiplies their value and relevance.
The result is products that, until recently, did not exist at conventional refineries: gasoline and diesel from 100% renewable sources, sustainable aviation fuel (SAF), bases for circular chemistry, etc. All these products add up to the necessary reduction of CO2 emissions throughout their life cycle. Renewable fuels are compatible with existing engines and infrastructure, making it possible to further reduce our carbon footprint without limiting competitiveness.
This capacity for transformation, which includes the adaptation of processes, the incorporation of new raw materials and the development of new products, is what distinguishes a modern industrial complex from a conventional facility. It's not just a matter of technology — it's a different way of understanding what a refinery can do and the role it can play in the economy of the future.
To understand how a refinery works is also to understand the moment we are living in terms of energy: with a system in transformation, in which the need to guarantee supply today coexists with a clear commitment to decarbonize processes and products, and in the case of Repsol, to achieve net-zero emissions by 2050. In this technical, industrial and strategic balance, we are defining the role these facilities will play in the coming years.
Far from being a continuation of the past, refineries are complex systems in constant evolution and which advance at the pace of the economy, technology, and regulation. As such, their future relevance will depend on their ability to adapt. Refining's next evolutionary step isn't to disappear but to transform: the ability to adjust processes, incorporate new raw materials. and produce new products through advanced technologies will be key to its role in an energy system in transition.