Two sources close to the process said the Moroccan government wanted at least $2 billion for the plant at Mohammedia, on the Atlantic coast near Casablanca. However, no decision on any sale is imminent, due partly to its complex debts.
The 200,0000 barrel per day refinery fell foul of the global oil price crash. It stopped operating in August 2015 after the government froze the bank accounts of its loss-making operator, Samir, seeking 13 billion dirham (£1 billion) in unpaid taxes.
If the deal goes through, it would become Glencore's (>> Glencore PLC) first oil refinery and allow the plant to restart production, a crucial condition for repaying debts to a wide group of foreign creditors.
A Moroccan court ruled last year that Samir (>> Samir) should be liquidated despite attempts to restart production by the company, which was controlled by the Corral Petroleum Holdings group of Saudi billionaire Mohammed al-Amoudi.
On top of the unpaid taxes, several large oil companies and trading houses, including Glencore, are owed around $1 billion by Samir. This debt was extended mainly in the form of crude oil which they lent to the refiner in return for repayment in cash or refined products later.
However, Samir became the biggest casualty of the 2014-2015 oil price crash in the Mediterranean region, becoming unable to repay the debts from sales of petroleum products.
Glencore, the world's second largest oil trader after Vitol, has repeatedly insisted the plant needs to restart production so creditors can gradually recoup the money.
It has now joined Carlyle (>> The Carlyle Group LP), which already co-owns refineries in Switzerland and Germany with Vitol, in offering to buy the plant, four industry sources familiar with talks said. The sources declined to be named as talks are confidential.
Glencore and Carlyle declined to comment.
Mohammed El-Krimi, appointed by a Moroccan court to oversee the plant's liquidation, said information about bidders and the process was confidential. "I cannot confirm or deny," he told Reuters.
Glencore has a $200 million prepayment deal with Samir funded by loans from banks Natixis and APICORP. A source familiar with the situation said negotiations to restructure the debt were on hold until there was clarity on the fate of the plant.
Trading houses have been specialising for decades in lending to clients in financial difficulty and earning extra money by getting preferential access to their oil or product flows.
Apart from Glencore, Samir's creditors include Vitol, BB Energy, Socar Trading and the trading arm of oil major BP (>> BP plc).
Among Samir's biggest lenders is Carlyle Commodity Management, a subsidiary formerly called Vermillion, which has been previously unseen in active commodities lending in Europe, the Middle East and Africa. Vermillion loaned oil worth over $400 million to Samir.
The price sought by the government remains up in the air. "Estimates are ranging wildly between $2 billion to $3.5 billion with or without debts and overdue taxes," one of the sources close to the process said, adding that there was no deadline for completing a sale and that a decision was not close.
At stake for Morocco are rebuilding its strategic fuel stocks, which had been stored at the plant, and the livelihood of the town of Mohammedia. According to Samir's website, the refinery and accompanying assets provided employment for 4,200 people.
However, the sale process has been described by several participants as lacking transparency on the total debts involved. Any buyer will also have to upgrade the plant after a long shutdown, which could cost hundreds of millions of dollars more.
"No adviser was approved to interact with potential investors... That is not the way to sell a desperate refiner to a foreign investor," a source with one of the creditors, who is not bidding for Samir, said.
"If you want to get documents about court proceedings, the only option is to go and read them in court," the source said, adding that photocopies were not allowed. "The process can be best described as the blind leading the blind."
(Additional reporting by Samia Errazzouki in Rabat, Dmitry Zhdannikov and Ron Bousso in London, Writing by Julia Payne, Editing by Dmitry Zhdannikov and David Stamp)
By Aziz El Yaakoubi, Julia Payne and Libby George