9.46am: The Scottish parliament is debating the release of Abdelbaset al-Megrahi, the Lockerbie bomber. They're just getting under way now, with some kind of procedural wrangle. I'll be blogging it all morning, and taking in other Megrahi developments, the most important of which should be an intervention from Gordon Brown, who is due to comment on the story when he launches a government employment package later today.

The initial hoo-hah in the Scottish parliament has finished. Kenny MacAskill, the Scottish justice minister, is opening the full debate now.

Kenny MacAskill. Photograph: Danny Lawson/PA

MacAskill says he will publish further information, when he gets permission from other governments to do so.

He is running through the steps he took before taking his decision. I did not see him when he addressed the Scottish parliament about this last month, but from the media reports it seemed to be a sticky encounter. Today he must be relieved to know that he's not the only person facing the pressure; yesterday's revelations have made this tricky for the UK government too.

9.52am: Did MacAskill tell Megrahi that he did not have to drop his appeal if he wanted release on compassionate grounds, an MSP asks. MacAskill says he decided to consider compassionate release and the application for prisoner transfer together (which does not really answer the question).

9.53am: MacAskill says an NHS cancer consultant did provide advice about Megrahi's condition. The suggestion that cancer specialists were not consulted was wrong. At this point, for the first time in the debate, there is some applause-type desk-banging from SNP MSPs. They don't seem to go in for "hear, hear"-ing in the Scottish parliament.

9.56am: Sky and BBC News have been carrying the debate live until now. But Sky has just given up, and gone to an advert break.

MacAskill says he did not rule out releasing Megrahi into custody in Scotland because of the cost to the police of guarding him. But he did not like the idea of Megrahi's being holed up in an "armed camp" in Scotland, with a "media circus" camped outside.

That's it. MacAskill moves the motion in his name. (I'll try to find the wording in a moment.) They do keep their speeches brief in Edinburgh.

9.59am: Richard Baker, the Labour justice spokesman, is speaking now. He says the documents released yesterday "raise more questions than they provide answers". He says they show that MacAskill had already decided to release Megrahi, long before he officially announced that that was what he was doing.

10.03am: Baker says it was "unprecedented" for MacAskill to meet someone who had committed such "heinous crimes" in prison.

Here is the MacAskill motion:

That the parliament notes the decisions by the cabinet secretary for justice to reject the application by the Libyan government to transfer Abdelbaset Ali Mohmed al-Megrahi under the prisoner transfer agreement between the United Kingdom and Libya and to release Mr al-Megrahi on compassionate grounds; notes that the decision on compassionate release is in accordance with the recommendations from the Scottish prison service and the parole board for Scotland, and endorses the decision as being consistent with the principles of Scottish justice.

And here is the Labour amendment:

As an amendment to motion (S3M-4748) in the name of Kenny MacAskill, leave out from second "notes" to end and insert "believes that the process of making this crucial decision was mishandled by the cabinet secretary for justice; believes that it was wrong for the cabinet secretary for justice to meet Abdelbaset Ali Mohmed al-Megrahi in prison while considering his application for compassionate release to Libya and that this potentially sets an inappropriate precedent; also believes that it was unacceptable that the media was made aware of the decision a week before it was formally announced; does not accept that the cabinet secretary for justice received or sought sufficient medical advice to make his judgment on Megrahi's prognosis; further believes that the cabinet secretary for justice did not sufficiently explore options to take account of Megrahi's illness other than compassionate release to Libya; recognises that Scotland's international reputation has been damaged not simply by the decision to release Megrahi on compassionate grounds to Libya but also because of the way that taking the decision was mishandled, and, given the mishandling of this process by the cabinet secretary for justice, does not agree with his decision to return Megrahi to Libya on compassionate release."

10.11am: Baker says four cancer specialists expressed doubt as to whether Megrahi only had three months to live.

Baker is now complaining about the BBC hearing about MacAskill's decision first. The BBC, and other media organisations, were saying Megrahi would be released several days before the announcement was made officially. Baker says there should be a leak inquiry.

For those of us who live in England, watching the Scottish parliament is a good reminder of just how real devolution is. The issues that they are debating in Edinburgh are (quite rightly) very different from those being debated on the Today programme this morning. Gordon Brown and David Miliband have not even been mentioned.

Bill Aitken, the Scottish justice spokesman, is speaking now. He actually has mentioned Brown. He wants to know why Megrahi was not kept in secure care in Scotland. He says the Glasgow airport bomber was held securely in a Scottish hospital for more than a month without difficulty.

The evidence released yesterday only deepened suspicions "that deals have been done", he says.

10.19am: This debate is going to run on for about three hours, but the MSPs will not vote until 5pm. (I see from the order paper, as we call it at Westminster, that they call this "decision time" in the Scottish parliament). BBC News has now given up on its live coverage. So the Scottish parliament got about 27 minutes of live coverage on the BBC. The BBC presenter says that we've now heard from "the three main parties". The Lib Dems won't like that. Scotland has a four-party system, and the Lib Dems have the same number of MSPs – 16 – as the Tories.

10.30am: Robert Brown, the Lib Dem justice spokesman, is up now. I'm watching through the live feed on the Scottish parliament's website. He says that MacAskill was required to act in a "quasi-judicial fashion", meaning that he should have behaved like a judge. But Brown says that he has never heard of a judge leaking his decision to the media in advance.

10.35am: An SNP MSP is now having a go at the "small-minded" opposition politicians at Holyrood. He points out that while Ian Gray, the Labour leader in Scotland, criticised the decision to release Megrahi, we now know that Brown was not in favour of Megrahi dying in prison. He says that Nelson Mandela was in favour of Megrahi being allowed home.

10.42am: I don't recognise the speaker, and I did not hear his name when he was being introduced, but he makes a very good point about the opposition facing the SNP today. The Scottish political pundits are saying that the SNP will lose the vote when it takes place at 5pm tonight because the opposition parties will unite behind one of the opposition amendments. But it's an opportunistic alliance, because Labour and the Tories have quite different positions on this. David Cameron said explicitly on the Today programme this morning that he thought Megrahi should have been allowed to die in jail. But Brown thought this should not happen.

10.43am: Elaine Murray, a Labour MSP, has just finished. She said she would be supporting all the opposition amendments – there are Tory and Lib Dem amendments on the table, as well as the Labour one that I put up earlier – because she thinks that MacAskill did not do enough to explore the alternatives to sending Megrahi back to Libya. She actually sounded genuinely angry about the whole affair and, for a moment, while she was up, the BBC switched back to their live coverage. Ian McKee, an SNP MSP, is speaking now, and BBC News has turned off again.

McKee says the opposition will win the vote tonight "because narrow party politics will come to the fore".

10.51am: Jack McConnell, the Labour MSP and former first minister, is next. He says that he supported the SNP, and opposed the Labour government in Westminster, when the SNP tried to exclude Megrahi from a prisoner transfer agreement with Libya. But he says the Scottish government has gone back on the promises made to America and others that Megrahi would serve his sentence in Scotland.

Scotland has shown compassion to Megrahi, McConnell says. But that compassion was not balanced by due concern for the interests of the relatives.

"We Scots have been trusted the world over ... In one decision, that reputation has been tarnished for years to come," he says.

McConnell also says that MacAskill should have met the relatives of the bombing face to face, not through a video conference.

And MacAskill should not have met Megrahi in person. Megrahi was an intelligence agent, trained to mislead.

11.03am: BBC News are showing McConnell live. And quite right too. It's the best speech of the debate so far.

11.05am: Michael McMahon, a Labour MSP, says the sight of "Saltires waving on the tarmac at Tripoli" has shamed Scotland.

11.07am: McMahon also criticises MacAskill for his comment about Megrahi facing judgment from a "higher power". This implied that God inflicted cancer on Megrahi. But MacAskill should not presume to speak on behalf of the Almighty, McMahon says.

11.10am: David McLetchie, the Tory MSP and former Conservative leader, says that when Alastair Campbell made his famous comment about not "doing God", he was saying that religion should not be involved in politics. Like McMahon, McLetchie also criticises MacAskill for referring to a "higher power". McLetchie says it was a particularly odd comment given that MacAskill said some time ago that he, personally, was not a believer.

11.16am: McLetchie says that Megrahi should have been allowed to die in a hospital in Scotland. He says that Scotland has better palliative care than Libya, and that some Libyans actually come to Scotland for cancer treatment.

11.19am: Jim Hume, a Lib Dem MSP, wants to know if MacAskill will visit other convicted prisoners in jail.

Today's proceedings in the Scottish parliament were opened by David Cameron.

Not, you will have calculated, the Conservative leader. We are dealing here with the Rev David Cameron of Queensferry parish, who was appearing in the regular prayer slot, irreverently titled by some "Thought for the Week".

Taylor thinks that the fact that Gordon Brown has become further embroiled in this row will help the SNP.

11.28am: Richard Simpson, a Labour MSP, says it was wrong for MacAskill to meet a prisoner while his appeal was still pending.

11.36am: Shirley-Anne Somerville, an SNP MSP, says that although MacAskill's decision was "painful" for Americans, the Scotland-USA relationship will endure. I don't know much about MacAskill's standing in his party, but, from the way the debate is going today, it seems that his colleagues are pretty supportive. None of the SNP MSPs has spoken against him.

11.47am: Sky are saying we should hear from Brown on this issue within the next half an hour. The PM is at a youth employment summit in Birmingham.

11.56am: Nick Robinson has written about this story on his blog this morning. Here's a flavour of his analysis:

Isn't what we've learned rather simple? British ministers – who are responsible for the UK's foreign, economic and trade policy – decided that they did not want Megrahi to die in prison and privately left no one in any doubt? They did so, careful at all times, to stress that it was not actually a decision for them.

Some would argue that this is precisely the sort of hard-headed "realpolitik" decision that we elect politicians to take.

However, the Tory leader, David Cameron, insists that he would not have taken it if he were prime minister, since justice demanded that the Lockerbie bomber serve his time and, if necessary, die in jail.

That is a fascinating debate. It is one that ministers in London refuse to enter as they continue to insist that their views on this extraordinarily sensitive matter were, somehow, irrelevant.

Robinson also includes a quote from Tony Blair, making it clear that he told the Libyans that he had no influence over the release of Megrahi.

Back in the Scottish parliament, Malcolm Chisholm, the Labour MSP (and former Scottish minister at Westminster) says that he is going to be voting with the SNP. "I'm not ashamed to hold the same views as Nelson Mandela on this or any other matter," he says. Chisholm also claims that public opinion is "more divided" on this issue than people think.

11.59am: In Washington, the US administration has confirmed that it expected Megrahi to serve his sentence in jail. This is from the story that Bloomberg is running on its website.

Ian Kelly, a US state department spokesman, told reporters yesterday that "there was an understanding that we had that he would serve out his sentence".

"The British government has also let us know that because of their policy of devolution and allowing Scotland to be responsible for its own home affairs, that it was a decision for the Scottish executive to make," Kelly added.

And the Bloomberg story includes this quote too:

The US justice department "received assurances in the 1990s that Megrahi's full sentence would be served in Scotland," said Richard Kolko, a department spokesman, in an email yesterday. He declined to comment on the specifics.

12.02pm: Back in Edinburgh, Angela Constance, an SNP MSP, is saying that Hillary Clinton, the American secretary of state, recently met one of Muammar Gaddafi's relatives in America.

12.03pm: Constance also says the idea that Megrahi could have gone to a hospice was "rather disingenuous".

Sky are now saying that they will go live to hear Brown comment on this shortly.

12.21pm: In Edinburgh, Annabel Goldie, the Tory leader in Scotland, is winding up the debate for her party. She says that she cannot support the MacAskill decision and that she will be supporting all the opposition amendments.

Sky and BBC News have switched to Birmingham, where Brown is about to speak.

12.23pm: Brown is talking now. He says he wants to talk about the contribution firms can make to tackling youth unemployment.

But first he wants to say something about Magrahi.

12.26pm: Lockerbie was a terrorist attack of the "gravest brutality". His thoughts remain with the families of the victims. Ever since, the government has been determined to win the fight against terrorism and nuclear proliferation.

In recent years Libya has moved from being a terrorist state to a country where it will work with others to combat terrorism. That's why it was the duty of those involved in the Megrahi case to consider the wider issues.

But Brown told Gaddafi at their one meeting that he could not intervene in the Magrahi affair, because it was a matter for the Scottish government.

Did we as a government say we would try to stop the Scottish government releasing Megrahi, Brown asks. No, the government did not.

Did the government try to intervene? No, the government did not. That was right, Brown says.

He also says that he was entitled to complain about the reception Megrahi received when he returned to Tripoli.

He "respects" the right of Scottish ministers to make the decision.

But there was no double-dealing, no cover-up, and no commercial deal, he says.

Now he has moved on to other issues.

Did the government try to intervene? No, the government did not. That was right, Brown says.

He also says that he was entitled to complain about the reception Magrahi received when he returned to Tripoli.

He "respects" the right of Scottish ministers to make the decision.

12.30pm: In summary: he has defended the government's decision to try to normalise relations with Libya, but he still has not said whether or not the Scottish government did the right thing when it released Megrahi.

1.19pm: Actually, my comment in the 12.30pm post wasn't quite right. Brown did not say whether or not he agreed with MacAskill. But he did say that he "respected" the decision - which is further than he has gone before in expressing an opinion on the subject.

This is the key quote:

I respect the right of Scottish ministers to make the decision, and the decision. But on our part, there was no conspiracy, no cover-up, no double dealing, no deal in oil, no attempt to instruct Scottish ministers, no private assurance by me to Colonel Gaddafi. We were absolutely clear throughout with Libya and everyone else that this was a decision for the Scottish government.

Alex Salmond, who was on his feet in Edinburgh winding up the debate as Brown was speaking, picked up on the "respect" line almost immediately.

Aides must have got the key quote to him very quickly, because he used it in his speech, claiming that it undermined the whole thrust of the case being made by Labour MSPs. I did not hear the Salmond speech properly, because I was writing up the Brown story, but I'm told that the first minister put on a classic display of Salmond, tub-thumping bravado.

MSPs vote at 5pm. I'll be on child-care duties by then, but a colleague will update this blog with the result. The SNP are expected to lose. But it's not a confidence vote, and it's not going to bring down the SNP administration.

Down here in London, Brown's comments do not seem to have lanced the boil. Cameron has just done another doorstep repeating his claims about the government being guilty of "double dealing" and I gather that William Hague will be issuing a letter on this subject later.

The government is particularly vulnerable over the charge that it misled the US, originally promising that Megrahi would serve his sentence in Scotland, and then wriggling out of this by claiming that the assurances given were never binding legal commitments.

I've just heard an American policy expert (not sure who - sorry) on the World at One saying that this was the sort of "duplicity" they would expect from the French, but not from London. I suspect that Brown still has more explaining to do.

3.20pm: The Scottish Greens have been in touch to complain about my reference (at 10.19am) to Scotland having a four-party system. They're in the parliament too. For the record, the SNP have 47 MSPs, Labour 46, the Conservatives and the Lib Dems 16 each, and the Greens two. There's also one independent, Margo MacDonald, and the presiding officer, Alex Fergusson.

3.28pm: The waspish American on The World at One (see my 1.19pm post) was David Rivkin, who worked in both the Reagan and Bush administrations. According to the Press Association, this is what he said:

If you untack what Mr Miliband basically said, it was clear that the British government at the highest level wanted to please Libya by letting Megrahi get out of prison. To say to Libya, in the situation where they are the ones responsible fundamentally for carrying out this attack ... saying, "We don't want him to die in prison" – that's total nonsense. The man has been convicted to a substantial term of imprisonment. The very formulation of the statement indicates that there is absolutely no interest in complying with undertakings that were given to the American side ... This will damage US relations with Britain for years to come ... I really can't think about a more duplicitous act by Britain vis-a-vis the United States in the post-war period.

5.06pm: The Scottish government has been defeated by 73 votes to 50 in the Holyrood vote over the release of the Lockerbie bomber