The airplane collided with up-sloping mountainous terrain at about 0822 Pacific time while maneuvering over the Joshua Tree National Park. The airplane was destroyed; the flight instructor and student were seriously injured. Instrument conditions existed in the vicinity. At about 0821, the flight contacted ATC at about 6100 feet msl and was issued a discrete transponder code but disappeared from radar at about 5600 feet msl before it could be identified. The Civil Air Patrol dispatched an airplane to overfly the area and detected an ELT, but could not establish visual contact. Search crews hiked to the site, locating it at about 2200 hours and about 5000 feet msl. Both pilots were found inside the upside-down airplane and were rescued.