What protocol uses BPDUs to detect loops on Layer 2 of the OSI model?

A) ARP (Address Resolution Protocol)
B) RIP (Routing Information Protocol)
C) OSPF (Open Shortest Path First)
D) STP (Spanning Tree Protocol)