NHS Lothian has entered into a “service level agreement” with the Archdiocese of St Andrews and Edinburgh to provide out-of-hours spiritual care, costing £30,000 a year, largely to ensure critically ill Catholics are read their last rites.

The church, which is the only religious organisation with which the health board has a specific agreement, said it was “long-standing practice” that cash was paid to organisations providing services to hospitals.

However, secular campaigners branded the payment “ridiculous” at a time when the NHS is becoming increasingly cash-strapped and said the church should foot the bill.