Scotland's opposition parties have been angered by a decision to pay a senior NHS manager compensation of more than £300,000 after she failed a competence test.

Lorna Naismith, former director of personnel at Glasgow Royal Infirmary University trust, was paid£305,017 as 'compensation for loss of office' after she took early retirement from her£69,000 a year post, having failed a competency test set up for the reorganisation of Scottish trusts this year.

All senior managers were given the test. Eight failed, which precluded them from applying for posts in the new trusts.

A Scottish Executive spokesperson confirmed that the money had been paid to the trust in the form of a lump sum and a pension entitlement.

The payout is revealed in the final accounts submitted to the government by Glasgow Royal Infirmary University trust .

Ms Naismith says the pension entitlement is the standard one available to anyone retiring and she left the service early because of the organisational changes.

Conservative health spokeswoman Mary Scanlon said: 'This is a total scandal. This woman is being paid for being incompetent.

'While people are in pain in hospital this woman is given a£300,000 payoff to retire early because she failed a competency test. How many more of these people are there in the NHS ready to take large payouts?'

Scottish National Party health spokeswoman Kay Ullrich said: 'If you match these kinds of payments against the terrible shortages of cash in the NHS then clearly it looks appalling.

However, this was widely discussed at the time and we don't want anger at this payout to detract from the real message, which is that the NHS is grossly underfunded in Scotland.'