Our teacher, the Beit Yosef, wrote in section 13: Regarding a loan with a document and an oral loan that is earlier, the oral loan is prior for collecting from unencumbered property, since witnesses testify that it preceded. Thus far his words. And our teacher, the Rema, wrote in section 1 regarding the matter that if the later creditor preceded and collected land, we remove it from his hand, that all this applies to a loan with a document; but regarding an oral loan, if the later creditor preceded and collected, what he collected, he has collected. Thus far his words. It is explained from their words that even though an oral loan does not collect from purchasers, nevertheless, from the borrower himself its law is like a loan with a document, since from the Torah the borrower's properties are liened even in an oral loan. Therefore, the law of priority applies to land even in an oral loan, and it even precedes a loan with a document when it is earlier, and certainly it precedes a later oral loan. However, regarding removing it from the hand of the later creditor, it is not similar to a loan with a document, and if the later creditor preceded and collected, what he collected, he has collected. This is the opinion of Rav Hai Gaon, that regarding unencumbered property there is a law of priority even in an oral loan, since there is no "locking of the door" here; and therefore, to remove it from the later creditor is impossible, as there would be a "locking of the door" in this, since it has no voice and the loan is not known, the later creditor could not have guarded himself [it appears to me]. But there are those of our teachers who disagree on this, for the Rif, of blessed memory, holds that a later loan with a document precedes an earlier oral loan, for in this too there is a "locking of the door," as everyone would be afraid to lend even with a document due to the concern that perhaps there is an earlier oral loan, since this has no voice. For the halacha, some say they shall divide [Shach]. And there is one who decided that if both are oral, the earlier one precedes, since the lien is from the Torah and there is no "locking of the door" here, why should it not be prior? But with an earlier oral loan and a later loan with a document, it is a legal doubt [Urim VeTummim]. And all this is regarding land that he had at the time of the loan, but for properties that he bought afterwards and did not write "that which I will acquire," and for movable property, certainly there is no priority and they divide [ibid.]. And this fact that an oral loan divides or takes everything when it is earlier according to the first opinion, this is specifically when the holders of the documents admit to him or he brings witnesses, but without this he is not believed, for perhaps he made a conspiracy with the borrower against the holder of the document [Radbaz]. And a document in his own handwriting, its law is like an oral loan, as I wrote in siman 69. And a document of deposit, even with witnesses, its law is like an oral loan and it does not collect from encumbered property [Shach ibid. subsection 14]. And therefore, with documents of iska, one does not collect from encumbered property except for the half that is a loan [it appears to me].
כתב רבינו הב"י בסעי' י"ג מלוה בשטר ומלוה ע"פ מוקדמת מלוה ע"פ קודמת לגבות מבני חרי כיון שעדים מעידים שקדמה עכ"ל ורבינו הרמ"א כתב בסעי' א' לעניין דאם קדם המאוחר וגבה קרקע דמוציאין מידו דכל זה הוא במלוה בשטר אבל מלוה ע"פ אם קדם המאוחר וגבה מה שגבה גבה עכ"ל ומתבאר מדבריהם דאע"פ דמלוה ע"פ אין מוציא מלקוחות מ"מ מהלוה עצמו דינו כמלוה בשטר כיון דמן התורה נשתעבדו נכסי הלוה גם במלוה בע"פ לכן נוהג דין קדימה בקרקע גם במלוה בע"פ ואפילו למלוה בשטר קדמה כשהיא מוקדמת וכ"ש שקדמה למלוה ע"פ מאוחרת מיהו לענין להוציא מיד המאוחר אינה דומה למלוה בשטר ואם קדם המאוחר וגבה מה שגבה גבה וזהו דעת רב האי גאון דלענין בני חורין יש דין קדימה גם במלוה בע"פ כיון דאין כאן נעילת דלת ולכן להוציא מהמאוחר א"א דיהיה בזה נעילת דלת כיון דלית לה קלא ואינה ידועה ההלואה לא היה לו להמאוחר לשמור א"ע [נ"ל] אבל יש מרבותינו שחולקים בזה דהרי"ף ז"ל ס"ל דמלוה בשטר מאוחרת קודם למלוה ע"פ מוקדמת דגם בזה יש נעילת דלת דכל אחד יהיה ירא להלות אף בשטר מפני חששא דשמא יש מלוה ע"פ מוקדמת כיון שאין לזה קול ולהלכה י"א דיחלוקו [ש"ך] ויש שהכריע דאם שניהם הם בע"פ המוקדם קודם כיון דשיעבודא דאורייתא ואין כאן נעילת דלת למה לא תהיה קודם אבל בע"פ מוקדמת ובשטר מאוחרת הוה ספיקא דדינא [או"ת] וכל זה לעניין קרקע שהיה לו בעת ההלואה אבל לנכסים שקנה אח"כ ולא כתב דאיקני ולמטלטלין וודאי דאין קדימה וחולקין [שם] וזה שמלוה ע"פ חולק או נוטל כולו כשהוא מוקדם לדיעה ראשונה זהו דווקא כשבעלי השטרות מודים לו או שמביא עדים אבל בלא זה אינו נאמן דשמא עשה קנוניא עם הלוה על בעלי השטר [רדב"ז] ושטר בכת"י דינה כמלוה ע"פ כמ"ש בסי' ס"ט ושטר פקדון אפילו בעדים דינו כמלוה ע"פ ואינו גובה ממשעבדי [ש"ך שם ס"ק י"ד] ולכן בשטרי עיסקא אינו גובה ממשעבדי רק החצי מלוה [נ"ל]: