A defunct Westminster graveyard put an unexpected spoke into what ought to have been a relatively easy £25m conveyancing transaction for Linklaters & Paines.

Linklaters acted for the NHS in selling the former Westminster Hospital to developer Ballymore Properties, represented by Ashurst Morris Crisp, for more than £25m.

The hospital stands around two sides of a pretty green, called St John's Square, which had once been a graveyard. Ballymore, which was converting the hospital into private flats, wanted “rights of light” – an assurance that the green would not be built on. But the incumbent parish priest – the Rev Ralph Godsall – still had rights over it.

“Unfortunately,” said Antonia Musgrove, who assisted Linklaters partner Peter Farren on the deal, “it turned out that the parish priest alone could not grant rights of light.” He had to apply to an ecclesiastical court, the Consistory Court, presided over by the Bishop of London's legal representative, a barrister, before they could be granted.

Another problem cropped up, said Musgrove, when the purchaser wanted to build a hut on the green for gardeners to store their tools. Building even shallow foundations would have meant penetrating the surface of a graveyard – something which required the permission of the Home Office.

“They got around that by building a shed that just sits on the surface,” said Musgrove.