The United Nations-recognised government says it will continue with its ‘legitimate self-defence’.

Libya‘s internationally recognised government has rejected a truce unilaterally declared by renegade military commander Khalifa Haftar during the Muslim holy month of Ramadan.

The Tripoli-based Government of National Accord (GNA) said in a statement on Thursday that it did not trust Haftar’s self-styled Libyan National Army (LNA), which launched an offensive on the capital, Tripoli, in April last year.

“We confirm our fixed position that we will continue with our legitimate self-defence and strike the source of threat wherever it is,” the statement said.

Earlier, LNA spokesman Ahmed Mismari had said the ceasefire came at the request of the international community and “friendly countries”.

Haftar’s fighters suffered a series of setbacks in recent weeks in their year-long campaign to seize Tripoli, with pro-GNA forces expelling them from two key coastal cities west of the capital.

Sami Hamdi, the editor-in-chief of the International Interest, a current affairs analysis magazine, told Al Jazeera that Haftar was announcing the truce now “because the tide of the Tripoli offensive has altered”.

“Now his two main bases, the spine of the Tripoli offensive, is under siege – that’s al-Watiya airbase where the supplies come in from the east, and Tarhuna,” he said.

“It seems Haftar is concerned that he might not be able to hold on to them for much longer. But more importantly, Haftar believes that domestically the situation needs attention. He needs to cement his authority in the east.”

Hamdi added Haftar wanted to use the time “to clean up the political mess in the east”.

“He made a unilateral declaration that he would rule Libya by a popular mandate. It was done to cut off any potential opposition that might take advantage of the reversal in the offensive.”

Last week, the UN, European Union and several countries called Libya’s warring sides to lay down their arms during Ramadan.

Oil-rich Libya has been engulfed in chaos since 2011 when longtime leader Muammar Gaddafi was killed in a NATO-backed uprising.

It is now split between two rival administrations, the Tripoli-based GNA and the eastern-based House of Representatives allied to Haftar.

Haftar launched a war to capture Tripoli a year ago, advancing into the southern suburbs before his offensive stalled, and his forces, backed by the United Arab Emirates, Egypt and Russia, have continually bombarded the capital.

The pro-GNA forces have pushed the LNA back from some areas in the northwest and repeatedly attacked its supply lines with the help of Turkish-supplied drones.

Human Rights Watch said on Wednesday the UAE had last year targeted a biscuit factory with a drone strike in support of the LNA, killing eight civilians in an attack it called “apparently unlawful”. The UAE and the LNA have not commented on that report.