Sudanese President Omar Hassan al-Bashir, wanted by the International Criminal Court on genocide charges, said Saturday he has offered to help Libya integrate its dozens of militias into the country's armed forces.

We have an experience in integrating rebels in a national army, said Bashir, whose visit to Libya drew criticism from human rights groups.

We have offered to help our brothers in Libya in building a national army that includes the components of the Libyan revolution. Our experts are available and our officers are available, he said.

Bashir also said he had offered the new Libyan government help from Sudanese troops in protecting Libya's southern borders during the war that ended Muammar Gaddafi's rule but that his offer was declined.

Libya's new rulers are struggling to include thousands of former rebels who helped oust Gaddafi in a military and police force or in civilian jobs.

Mustafa Abdul Jalil, chairman of the National Transitional Council, warned this week that Libya risks sliding into civil war unless it cracks down on rival militias which filled the vacuum left by Gaddafi's downfall.

The militias are vying with each other for influence, and believe that to ensure they receive their due share of political power they need to keep an armed presence in the capital.

Abdul Jalil, who visited Khartoum in November, has said Sudanese weapons and ammunition helped Libya's former rebels oust Muammar Gaddafi last year and take control of the North African country.

Relations between Khartoum and Tripoli were strained during Gaddafi's rule because of his support for rebels in Sudan's western Darfur region and in South Sudan, which gained independence in July under a 2005 peace deal.

Bashir said that the ousting of Gaddafi was the best piece of news in Sudan's modern history.

We came here to thank the Libyan people for the gift they offered to the Sudanese people by removing Gaddafi, he said.

RIGHTS GROUPS' CRITICISM

Bashir's visit was criticised by rights groups.

Welcoming Bashir ... raises questions about the NTC's stated commitment to human rights and the rule of law, Richard Dicker, international justice director at Human Rights Watch, said in a statement.

Following the end of decades of brutal rule in Libya, it is disturbing if Tripoli hosts a head of state on the run from international arrest warrants for grave human rights violations.

Mohammed al-Keelani, who heads a group of 50 Libyan civil society organizations, said Bashir was not welcome in Libya.

For us, Omar al-Bashir is the Gaddafi of Sudan, he said. We have reservations against this visit because he's a tyrant who oppresses his people and his policy contradicts our principles.

Bashir is under increasing pressure at home after his country lost much of its oil production to the south.

(Additional reporting by Ali Shuaib; Editing by Louise Ireland)