ICC judges have previously resisted giving up jurisdiction in the cases of al-Senoussi and of Gadhafi's son Seif al-Islam, both of whom are being held in Libya, saying the country's legal system simply wasn't ready.
"This is a shocking decision which we will immediately appeal," said al-Senoussi's lawyer, Ben Emmerson.
Emmerson said there is "overwhelming evidence...that the Libyan justice system is close to collapse and that it is incapable of conducting fair trials of any Gadhafi-era officials."
Al-Senoussi is accused by the ICC and Libyan prosecutors of crimes against humanity for the murder and persecution of protesters in the early days of the uprising that eventually toppled Gadhafi in 2011.
Separate from the ICC case, he has been accused of complicity in blowing up a Pan Am jumbo jet over Lockerbie, Scotland in 1988 and a French airliner over Niger the following year causing hundreds of deaths.
The ICC judges said they took a number of factors into account in their decision, notably that al-Senoussi is being held by the national government, which Seir al-Islam is held by a regional authority.
Court spokesman Fadi El Abdallah said Friday's decision has no bearing on Seif al-Islam's case. However, it raises the question of why Seif al-Islam couldn't be tried in Libya too, if forces in the mountain region of Zintan turn him over to national authorities.
Reasons judges cited to believe Libya is ready to try al-Senoussi properly include "the quantity and quality of the evidence" collected by local prosecutors, and the track record of Libyan courts in other prosecutions.
"The spotlight for now is on Libya to make good on its promise to respect Senoussi's rights," Richard Dicker of Human Rights Watch said Friday.
Al-Senoussi was arrested in March 2012 at Mauritania's international airport, disguised as a Tuareg chieftain in flowing robes and a turban. He was extradited to Libya later that year.
"The effect of this morning's decision is to condemn Mr. al-Senoussi to face mob justice without even access to a lawyer, and in which the inevitable outcome is the death penalty," his lawyer Emmerson said.
_____
Associated Press reporter Mike Corder contributed to this story from The Hague, Netherlands.