A court in South Korea has refused a request by prosecutors to issue an arrest warrant for Samsung chief Lee Jae-yong, who has been accused of bribery, embezzlement and perjury.
It ruled that there was insufficient reason to arrest him.
He was later seen leaving the Seoul detention centre where he had been awaiting the ruling.
The allegations were part of a corruption scandal which led parliament to impeach President Park Geun-hye.
Mr Lee had been waiting for the ruling for more than 12 hours, since a hearing on Wednesday.
"The merits of this case can now be determined without the need for detention," Samsung said in response to the court order.
A spokesman for the court said the long wait for the ruling was because the judge had needed time to consider various factors before making a decision.
South Korea's special prosecutors made a formal request for an arrest warrant earlier this week.
Correspondents say their hopes of stretching criminal proceedings to include the president - who was stripped of her powers last month - may have been knocked off course by the refusal to issue a warrant against Mr Lee.
Samsung has consistently denied any wrongdoing.
The electronics giant is accused of giving donations to non-profit foundations operated by Choi Soon-sil, a friend of Ms Park, in exchange for government favours.
It has admitted making payments but insists it did not expect any favours in return.
Mr Lee, also known as Jay Y Lee, gave evidence at Seoul Central District Court on Wednesday.
He is currently vice-chairman of Samsung Electronics but since his father, Lee Kun-hee, suffered a heart attack in 2014, he is considered de facto boss of the entire Samsung Group conglomerate.
Samsung is South Korea's most high-profile company, and its sales are equal to about a fifth of the country's GDP.
(BBC)