While Libya was considered a pariah by much of the international community under the rule of Muammar Gaddafi, Italy maintained diplomatic relations with Libya and exported a significant quantity of its oil from the country. Relations between Italy and Libya warmed in the first decade of the 21st century, when they entered co-operative arrangements to deal with illegal immigration into Italy. Libya agreed to aggressively prevent migrants from sub-Saharan Africa from using the country as a transit route to Italy, in return for foreign aid and Italy's successful attempts to have the European Union lift its trade sanctions on Libya.
On 26 September 2011, Italian energy company Eni announced it had restarted oil production in Libya for the first time since the start of the 2011 Libyan civil war. The quick return of Eni to Libyan oilfields reflected the positive relations between Rome and Tripoli under the NTC.