Sorry to have to tell you this, but it sounds like you have the so called 'death rattle'. If the car has a full BMW service history, you may be able to get it repaired as a goodwill gesture by BMW. However, I just noticed it's a D? I didn't think this issue affected the diesel engines. It needs to be checked and sorted, or the timing chain could snap and that would require a new engine.
It's a known fault with earlier petrol engines, especially in the S....as S & D are next to each other on the keyboard, I'm thinking you meant it's an S.
Do a google search for Mini death rattle.....they did put out a fix for it, but if you have to pay for it, then it will be expensive. There are also a whole load of youtube videos about it
The AutoGuide.com network consists of the largest network of enthusiast-owned enthusiast-operated automotive communities.
AutoGuide.com provides the latest car reviews, auto show coverage, new car prices, and automotive news. The AutoGuide network operates more than 100 automotive forums where our users consult peers for shopping information and advice, and share opinions as a community.