Magnetic reconnection, a change of magnetic field connectivity, is a fundamental physical process in which magnetic energy is released explosively. It is responsible for various eruptive phenomena in the universe. However, this process is difficult to observe directly. Here, the magnetic topology associated with a solar reconnection event is studied in three dimensions (3D) using the combined perspectives of two spacecraft. The sequence of extreme ultraviolet (EUV) images clearly shows that two groups of oppositely directed and non-coplanar magnetic loops gradually approach each other, forming a separator or quasi-separator and then reconnecting. The plasma near the reconnection site is subsequently heated from $sim$1 to $ge$5 MK. Shortly afterwards, warm flare loops ($sim$3 MK) appear underneath the hot plasma. Other observational signatures of reconnection, including plasma inflows and downflows, are unambiguously revealed and quantitatively measured. These observations provide direct evidence of magnetic reconnection in a 3D configuration and reveal its origin.