Saif al-Islam Gaddafi, the son of former Libyan dictator Colonel Gaddafi, has been sentenced to death for war crimes.
A court in the capital Tripoli sentenced Gaddafi in absentia over suppression relating to the country's 2011 uprising, during which his father was killed.
In a televised session, the court also handed a death sentence by firing squad to Gaddafi's former prime minister Baghdadi al-Mahmoudi and former spy chief Abdullah al-Senussi.
Gaddafi had given evidence video link during the trial as he is currently being held in the town of Zintan by a former rebel group.
The group opposes the Libyan government, which is not recognised by world powers.
The spread of Islamic State into Libya helped sow the seeds for the Tunisia beach attack, the Foreign Secretary has said.
Philip Hammond said: "I think the thing that has changed is the spread of Isil into the ungoverned territory of Libya, a neighbouring country to Tunisia."
Seifeddine Rezgui shot dead 38 people on the beach in the resort of Sousse on Friday.
It came as confirmation that Rezgui went to Libya to train at the same time as the gunmen involved in the Bardo museum attack in March.
The Irish Navy has rescued 647 migrants from the Mediterranean off the coast of Libya.
In two separate operations, 544 men, 95 women and eight children were taken off two wooden barges by the crew of the LE Eithne about 50 miles north-west of Tripoli.
The US military confirmed that Algerian militant Mokhtar Belmokhtar was the target of a US air strike in Libya but did not say if he had been killed.
"The strike was carried out by U.S. aircraft. We are continuing to assess the results of the operation and will provide more details as appropriate," Pentagon spokesman Colonel Steve Warren said in a statement.
Libya's recognised government earlier claimed that Belmokhtar, blamed for masterminding an Algerian gas field attack and running smuggling routes across North Africa, was killed in the strike inside Libya.
Libya's recognised government claim veteran Algerian militant Mokhtar Belmokhtar has been killed in a US air strike inside Libya as part of counter-terrorism cooperation.
Earlier, the US Department of Defense said they hadconducted a counterterrorism strike against an al Qaida-associated target in Libya on Saturday night, but were assessing results before providing more details.
"The Libyan government in the east of Libya confirms that the US fighter jets conducted air strikes last night in a mission which resulted in the death of the terrorist Belmokhtar," Libya's government said.
It is not the first time reports of Belmokhtar's death have surfaced. The man, who is thought to be behind the 2013 hostage crisis in Algeria, was reported to have been killed in Mali later that year.
The US military has carried out a "counter-terrorism strike" against an alleged al Qaeda-associated militant in Libya.
The Pentagon confirmed the strike was carried out on Saturday night.
A US Defense Department official said: "We are assessing the results of the operation and will provide additional information as and when appropriate."
Ten Tunisian consulate staff members who were kidnapped by gunmen on Friday, are reportedly in a "good condition".
Libya's Interior Minister Mohamed Shaiteer told Reuters contact had been made with the gunmen who stormed the consulate offices in Libya.
He said: "I am in contact with the group who abducted the Tunisian staff and hopefully the staff will be freed soon. They are in good condition."
Armed attackers stormed the Tunisian consulate in Libya and kidnapped 10 members of staff, government officials confirmed.
The Tunisian Foreign Ministry labelled the incident a "blatant attack on Tunisian national sovereignty and a flagrant violation of international laws and diplomatic norms".
Tunisia is one of the few countries to maintain a consulate in the Libyan capital Tripoli, which is run by a government not recognised by international leaders.
Royal Navy warship HMS Bulwark is involved in a rescue mission to save at least 500 migrants found in four boats off the coast of Libya, the Ministry of Defence has said.
Libya's internationally-recognised Prime Minister Abdullah al-Thinni has said he survived an assassination attempt after leaving a parliamentary session today in the eastern city of Tobruk, Reuters reports.
"Thank God, we managed to escape," he reportedly told pan-Arab news channel al-Arabiya.
A spokesperson for the Prime Minister, Hatem El Ouraybi, told AFP news agency that a bodyguard was hurt in the attack.
He said: "The prime minister's car was hit by bullets when armed men opened fire as it was leaving an area where a session of parliament was held.
"The Prime Minister was not hurt, but one of his bodyguards was wounded."