the detachments commander , first lieutenant gennady safonov , took his responsibilities so seriously , risking his life to protect the refugees , that he was later recognized as a righteous gentile by yad ve-shem .