A foldable ladder (200;300) for use within a pit of an elevator system, the foldable ladder (200;300) comprising: a first upright (202;302), a second upright (204;304), and a plurality of rungs (206;306) extending from the first upright (202;302) to the second upright (204;304), wherein each rung (206;306) is pivotally mounted to each of the first upright (202;302) and the second upright (204;304); a locking mechanism (208;308) having a first segment (212;312) pivotally attached to the first upright (202;302) and a second segment (214;314) pivotally attached to the second upright (204;304), wherein the first segment (212;312) and the second segment (214;314) are pivotally connected; and a locking device (318;418) located on the first upright (202;302) and operably connected to the first segment (212;312), the locking device (318;418) comprising: a first portion comprising a first catch and a second catch; a second portion (422;522) comprising a pin (430;530) moveable to engage with the first catch to secure the locking mechanism (208;308) in a first position and moveable to engage with the second catch to secure the locking mechanism (208;308) in a second position; a biasing mechanism (432;532) applying a force to the pin (430;530) to engage the pin (430;530) with the first or second catch (426,428); and an operating device (434;534) operable to apply an opposing force against the biasing mechanism (432;532) to disengage the pin (430;530) from the first or second catch (426,428). a first upright (202;302), a second upright (204;304), and a plurality of rungs (206;306) extending from the first upright (202;302) to the second upright (204;304), wherein each rung (206;306) is pivotally mounted to each of the first upright (202;302) and the second upright (204;304); a locking mechanism (208;308) having a first segment (212;312) pivotally attached to the first upright (202;302) and a second segment (214;314) pivotally attached to the second upright (204;304), wherein the first segment (212;312) and the second segment (214;314) are pivotally connected; and a locking device (318;418) located on the first upright (202;302) and operably connected to the first segment (212;312), the locking device (318;418) comprising: a first portion comprising a first catch and a second catch; a second portion (422;522) comprising a pin (430;530) moveable to engage with the first catch to secure the locking mechanism (208;308) in a first position and moveable to engage with the second catch to secure the locking mechanism (208;308) in a second position; a biasing mechanism (432;532) applying a force to the pin (430;530) to engage the pin (430;530) with the first or second catch (426,428); and an operating device (434;534) operable to apply an opposing force against the biasing mechanism (432;532) to disengage the pin (430;530) from the first or second catch (426,428). a first portion comprising a first catch and a second catch; a second portion (422;522) comprising a pin (430;530) moveable to engage with the first catch to secure the locking mechanism (208;308) in a first position and moveable to engage with the second catch to secure the locking mechanism (208;308) in a second position; a biasing mechanism (432;532) applying a force to the pin (430;530) to engage the pin (430;530) with the first or second catch (426,428); and an operating device (434;534) operable to apply an opposing force against the biasing mechanism (432;532) to disengage the pin (430;530) from the first or second catch (426,428).