Health trusts in the West are being given millions of pounds to help pay off their debts.
The money has come from the government via NHS South West.
Wiltshire PCT's £20m debt is being wiped out as a reward for making about £8m savings and reinvesting in neighbourhood community nurses.
Anne Kennedy, from the PCT, said: "Prior to these teams being developed, the service stopped at 5pm. We're now providing a service up to 10pm."
North Somerset NHS PCT will receive £12m, leaving it with a £5m black hole.