The terminally ill Libyan man convicted in connection with the 1988 Lockerbie bombing that killed 270 people has been freed by Scotland's justice minister.

In spite of protests from the United States, Abdel Basset Al Megrahi, a former Libyan intelligence agent, has been released from a Scottish prison and departed for his native country by plane Thursday.

"Our belief dictates that justice be served but mercy be shown," said Kenny MacAskill, Scotland's justice secretary, ordering that the 57-year-old convict "be released on compassionate grounds and be allowed to return to Libya to die."

Megrahi was sentenced to life in prison in 2001 for taking part in the bombing of Pan Am Flight 103 on Dec. 21, 1988, and was to serve at least 27 years behind bars.

However, he was diagnosed with terminal prostate cancer last year and doctors have said he has less than three months to live.

"Scotland is not making an exception in the case," said Tom Kennedy, CTV's London bureau chief told Canada AM. "When you are terminally ill in a Scottish prison, you will be very seriously considered for compassionate leave."

Megrahi is the only person who has been convicted in connection with the attack, in which a plane carrying 259 people exploded over Lockerbie, a town in south-west Scotland. Eleven people on the ground also died.

The flight was bound for New York and many of the passengers on board were American.

U.S. Secretary of State Hillary Clinton and seven U.S. senators had requested that MacAskill not release Megrahi. On Thursday, the White House said it "deeply regrets" the decision to free him.

"As we have expressed repeatedly to officials of the government of the United Kingdom and to Scottish authorities, we continue to believe that Megrahi should serve out his sentence in Scotland," the White House said in a statement. "On this day, we extend our deepest sympathies to the families who live every day with the loss of their loved ones."

MacAskill said he is aware there "were deeply held feelings and that many may disagree," with the decision.

"Some hurts can never heal, some scars can never fade," MacAskill said. "However, Mr. Al Megrahi now faces a sentence imposed by a higher power."

In 2007, a review of Megrahi's case found there were grounds to appeal his conviction. He has maintained his innocence throughout his trial and incarceration, and many people in Britain believe he is innocent.

"There has always been some doubt over the validity of his conviction," Kennedy said. "These people as well are going to be delighted by his release."

Moammar Gadhafi, Libya's leader, had been campaigning for Megrahi to be allowed to return home.

In the wake of the Sept. 11, 2001 terrorist attacks in the U.S., Ghadafi transformed his country's relationship with Western governments, and the Lockerbie bombing became part of Libya's rapprochement.

On top of renouncing terrorism and halting Libya's secret nuclear program, Gadhafi accepted his government's culpability for the bombing and paid compensation to families of the victims.

With files from The Associated Press