The entanglement dynamics of two independent qubits each embedded in a structured environment under conditions of inhibition of spontaneous emission is analyzed, showing entanglement trapping. We demonstrate that entanglement trapping can be used efficiently to prevent entanglement sudden death. For the case of realistic photonic band-gap materials, we show that high values of entanglement trapping can be achieved. This result is of both fundamental and applicative interest since it provides a physical situation where the entanglement can be preserved and manipulated, e.g. by Stark-shifting the qubit transition frequency outside and inside the gap.PACS numbers: 03.67. Mn, 03.65.Yz, 71.55.Jv Entanglement preservation is an important challenge in quantum information and computation technologies [1]. Realistic quantum systems are affected by decoherence and entanglement losses because of the unavoidable interaction with their environments [2]. For example in Markovian (memoryless) environments, in spite of an exponential decay of the single qubit coherence, the entanglement between two qubits may completely disappear at a finite time [3,4]. This phenomenon, known as "entanglement sudden death" and proven to occur in a quantum optics experiment [5], in turn limits the time when entanglement could be exploited for practical purposes. It is therefore of interest to examine the possibility to preserve entanglement. In the case of environments with memory (non-Markovian), such as imperfect cavities supporting a mode resonant with the atomic transition frequency, revivals of two-qubit entanglement have been found [6,7,8]. These revivals, although effectively extending the possible usage time of entanglement, decrease with time and eventually disappear after a certain critical time. Moreover, when the qubits interact with a common environment, it has been shown that entanglement can be preserved by means of the quantum Zeno effect [8].In this paper we continue the investigation on physical systems and physical effects that may lead to effective long time entanglement protection. Since entanglement evolution and population decay have been previously shown to be related [7], one is led to investigate situations where population trapping occurs. This can happen in structured environments where the density of states presents a dip which can inhibit spontaneous emission in the region of the dip [9]. Among realistic physical situations, this effect is known to occur in photonic band-gap (PBG) materials [10]. Entanglement can be generated when a pair of atoms near-resonantly coupled to the edge of a PBG present direct dipole-dipole interaction [11]. On the other hand, a way to produce entangled independent atoms in PBG materials is to consider a three-dimensional photonic crystal single-mode cavity with a sufficiently high-quality Q factor where Rydberg atoms can freely travel through the connected void regions [12]. The atoms exchange photons with the cavity, represented by a single defect mode of the crystal resonant with t...