The funeral of Abdelbaset al-Megrahi, the only person to be convicted of the 1988 Lockerbie bombing, has taken place just outside the Libyan capital of Tripoli.

There were reportedly less than 100 family members and other mourners in attendance at the funeral for Megrahi, who died of prostate cancer at the age of 60 on 20 May.

The service was largely a private affair that took place in the suburb of Janzur, 11 miles west of Tripoli, where many of Megrahi's family members are also buried.

The small funeral was in stark contrast to the hero's welcome Megrahi received in August 2009, when he was released from a Scottish jail and sent back to Libya on compassionate grounds after he was diagnosed as having cancer.

Megrahi was found guilty of blowing up Pan Am Flight 103 over the Scottish town of Lockerbie in 1988, killing all 259 people on board and another 11 people on the ground.

Despite being told he only had three months to live, Megrahi lived for three years with cancer and only served eight years of his life sentence for the murder of 270 people in the worst terrorist attack on British soil.

Megrahi always claimed he was innocent of the charges against him. His brother Abdelhakim, who broke the news of his death, told AFP: "He has died and has left us with the feeling of injustice.

"Everyone knows that the Gaddafi regime blamed its mistakes on others."

Scotland's justice secretary, Kenny MacAskill, defended his decision to release Megrahi and insists it was done for the right reasons.

"I said at the time that it was a privilege to hold the position of justice secretary in the Scottish government," MacAskill said.

"You have to deal with what comes before you. I didn't choose to address this matter, but it was my obligation as the justice secretary to address it.

"I did so without fear or favour, I did so following the rules and laws that we have in Scotland, based upon the evidence provided. It was information given to me that was honest, open and transparent, and I stand by that decision.

"It was the right decision for the right reasons."

Al-Megrahi Death: David Cameron Rejects Fresh Lockerbie Bombing Inquiry