61 31 241 Removing And Installing/Replacing Engine Hood Contact Switch
WARNING: This page is about a different car, the 2008 BMW Alpina and 2007 BMW Alpina. However, it is still accessible from the selected car via links, so may be relevant.
Unfasten plug connection (1) and disconnect.
Press catches (2) together and feed hood contact switch (4) in direction of arrow out of fixture (3).
Fig 1: Identifying Plug Connection, Catches And Hood Contact Switch