his heart jumped in his chest and he brought the gate fully up against its rest and then reached through the bars , turned the key , relocking the gate , and tried to extract it , but it would not come out .