This is a scorpion fly, Panorpa spp.
There are three species in the UK (Pp. communis, cognata, germanica), and they are so similar they require expert analysis to ID. However, I think P. germanica is limited to Scotland (and elsewhere in Europe), so yours is one of the other two species.
Update 3sep13: No - P. germanica is not limited to Scotland; sorry to mislead you. I have just discovered Tim Worfolk's excellent info on British scorpion flies by here - http://thetopshamnaturalist.blogspot.com/2010/05/scorpion-flies.html. In your particular case, that does not help us ID the species.
The simply-pointed tip to the abdomen shows it is a female.
(The male's abdomen ends in what looks like a scorpion's stinger - hence the name 'scorpion fly'.)
Neither sex stings. However, the male can pretend to do so!
They have biting mouthparts, but I don't think they nip humans (anybody: tell me if you know otherwise!)
Ahh... now I look again in my book yes of course it is. Thanks Mike!
I have updated my post above, following my discovery of Tim Worfolk's excellent work on British scorpion flies.