
245 P.2d 816 (1952)
SMITH
v.
COOPER.
No. 7771.
Supreme Court of Idaho.
June 25, 1952.
*817 William J. Dee, Grangeville, for appellant.
Paul G. Eimers, Grangeville, for respondent.
THOMAS, Justice.
Smith, hereinafter referred to as the appellant, brought action against Cooper, hereinafter referred to as respondent, in claim and delivery to recover possession of certain sawmill machinery and equipment, based upon asserted ownership and breach of contract under which respondent was allegedly placed in possession.
The property was seized under Writ by the Sheriff on March 16, 1948.
Respondent filed an answer and cross-complaint, alleging ownership, the right to possession and the wrongful seizure and retention by appellant. Appellant answered the cross-complaint, and upon issue joined the matter was tried before the court without a jury.
At the conclusion of the appellant's case, upon motion, a nonsuit was granted, and the court then proceeded to hear the testimony in support of and opposition to respondent's cross-complaint. The court, subsequent to the conclusion of all the testimony, and on December 12, 1950, made findings and conclusions and entered judgment for respondent on his cross-complaint in the sum of $1750 for the value of the property seized, and $2000 damage for the wrongful possession and retention thereof from March 16, 1948.
The appeal is from the judgment.
While the appellant has made some ten assignments of error, when properly grouped they may be treated and considered as error in entering judgment of nonsuit against the appellant and the insufficiency of the evidence to support the findings or judgment on the cross-complaint.
The evidence is voluminous and in several material respects is in sharp conflict, particularly with reference to the ownership of the property seized.
The original negotiations between the parties occurred just prior to May 8, 1946, and on that date they entered into a written contract which on its face appears to be a sales agreement, for the sale by appellant and purchase by respondent of certain of the property involved in this action and replacements and additions thereto. Respondent testified that he purchased a sawmill and machinery from a third person in Oregon, without knowledge that it was encumbered by a mortgage in the amount of $1050; that in order to save the property appellant advanced respondent $1050 and took title but not possession of the property, as security for the money so advanced and further sums that might be advanced under a contract which respondent introduced in evidence.
The contract provided that respondent would saw lumber for appellant at the unit price of $12 per thousand feet and $4 per cord for cord wood and would cut timber for appellant, the unit price not being provided for in the agreement. Appellant testified that the unit price for cutting was $5 per thousand board feet, while the respondent testified that the unit price for this service was $7.50 per thousand board feet. It is further provided therein that the appellant would furnish the sawmill and equipment, the subject matter of this action, and that respondent would pay as rental therefor, the unit price of $6 per thousand feet and upon full compliance and when the rental payments shall amount to $1050 with interest at six percent and all advances *818 have been repaid, appellant would deliver a bill of sale for the equipment to respondent. Otherwise the contract shall become null and void.
Respondent testified as to the total footage he sawed for appellant, and this was admitted by appellant; he also testified as to the total footage he logged for appellant and that the agreed price was $7.50 per thousand. Appellant testified that there was less footage logged than as testified to by respondent, and testified that the unit price was $5.00 a thousand; there was sharp conflict in the evidence as to the mutual and reciprocal charges and credits throughout the operations in Oregon.
Late in October, 1947, the lumbering operations of the appellant and the mill and equipment were moved into Idaho, and on October 20, 1947, the parties entered into the following written contract with reference to certain standing timber belonging to appellant:
"October 20, 1947
"Logging and Lumbering Contract.
"This agreement made and entered into this 20th day of October 1947 by and between A. R. Cooper, * * *. hereinafter known as party of the first part. and L. R. Smith hereinafter known as party of the second part.
"Witnesseth: For the sum of $27.00 per thousand feet, lumber scale first party agrees to log, saw, haul and pile in second party's lumber yard, on Whitebird creek, as directed by second party. also to furnish all labor, supplys, and repairs, and comply strictly with all State, and Federal laws, rules, and regulations.
"Second party agrees to pay first party on the 5th and 20th of each month, for all lumber delivered and piled, up to the first, and 15th of each month, also to furnish mill, and power.

"Signed and sealed this 20th day of October, 1947
                A. R. Cooper
             * * * *
             * * * *
                L. R. Smith."
Respondent worked under this latter contract until the time the property was seized by the Sheriff in the claim and delivery action.
The appellant relied on this latter contract to support his contention that he owned all the equipment, while respondent relied upon the earlier contract as one of security and not of purchase to support his contention that he was the owner and entitled to the possession of the property and further contended that the contract of 1947 was one for work and services, and that the underscored words were added to the contract after it had been executed and that he never received a copy of the contract and had no knowledge of the alteration until the contract was offered in evidence.
Further conflicting evidence was admitted with respect to the Idaho operations relating particularly to the mutual and reciprocal charges and credits.
The primary question in issue in an action of claim and delivery is right to the possession of the property in controversy. Commercial Credit Co. v. Mizer, 50 Idaho 388, 296 P. 580; American Fruit Growers v. Walmstad, 44 Idaho 786, 260 P. 168; Cunningham v. Stoner, 10 Idaho 549, 79 P. 228; Sec. 8-305, I.C.
The court found that the contract of 1947 had been altered after its execution by adding the words: "and to supply mill and power", and that the contract of 1946 was a security transaction and not a contract to sell and purchase and that the acquisition of title by appellant was given to secure the repayment of the original advance of $1050 and other and further advances and replacements made by him for and on behalf of respondent; that respondent had delivered to appellant under the two agreements, sufficient amount of lumber to repay all indebtedness to appellant and that the mortgage had been paid in full and should be discharged; that respondent was the owner and entitled to the possession of the property seized, and that the seizure and retention was wrongful.
*819 Upon a review of the evidence of appellant, we believe that he made out a prima facie case of both ownership and the right to possession, and it was hence error to grant the nonsuit at the conclusion of appellant's case; however, where the complaining party has not been prejudiced by the erroneous granting of a nonsuit, the error is harmless. Piper v. Taylor, 17 Ariz. 351, 152 P. 863; 5 C.J.S., Appeal and Error, § 1756, p. 1071. If, upon the whole case, the findings and judgment for respondent are not otherwise subject to reversal, the error in granting the nonsuit is harmless.
We will now consider the matter of whether or not the agreement of May 8, 1946, which upon its face purports to be a sales contract, is in fact and in law a mortgage or any form of security device to secure a debt. This depends upon the intention of the parties at the time the transaction was consummated. Such intention may be gathered from the instrument itself and from extrinsic evidence of earlier and subsequent acts and declarations of the parties, to the extent they are relevant to a determination of their intent at the inception of the transaction. While the agreement itself is not necessarily conclusive, yet it contributes some evidence which, when considered with all other relevant surrounding facts and circumstances, may reveal the real character of the transaction. It may be that one or more tests become of controlling importance in such determination. State v. Snyder, 71 Idaho 454, 233 P.2d 802; 155 A.L.R. 1104; 14 C.J.S., Chattel Mortgages, § 3, pp. 578-579; § 7, pp. 588-592, and this principle has been applied to conditional sales contracts. 14 C.J.S., Chattel Mortgages, § 7, pp. 593-595.
The controlling test to be applied in determining whether the transaction is a mortgage is a determination of whether or not there is a subsisting debt after the transaction; again, whether or not the transfer is intended merely to secure an existing indebtedness or loan or to extinguish it; if it is intended to secure an existing indebtedness, it is a mortgage. State v. Snyder, supra, and the cases therein cited; see also 14 C.J.S., Chattel Mortgages, § 7, p. 589.
The nature of the transaction is also tested on the basis of whether or not the transferor retains possession and, where this is so, it is indicative that a mortgage was intended. Again, if the transferor is in financial difficulty and is severely pressed for money at the time of the transfer, impairing his ability to exercise the freedom of choice with reference to the disposition of his property and was able to secure the needed financial assistance only by passing title to another with the right to repurchase, there is a strong indication that a mortgage was intended.
State v. Snyder, supra, and authorities therein cited.
At the inception of the negotiations between the parties and at all times since, respondent has had and retained possession of the property and all replacements; at the inception of the transaction there existed an indebtedness from respondent to appellant which was not extinguished; at the time the transaction was consummated the respondent was sorely pressed for financial aid in order to free the property from an encumbrance which he knew nothing about at the time he made the purchase, and this money was furnished by appellant to pay off said encumbrance under his own terms and conditions whereby respondent was not in a position to exercise freedom of choice but was obliged to recognize title in appellant in order to secure such needed financial assistance.
When all these tests are applied, and all the facts and circumstances surrounding the transaction are considered, it is indicated that the parties intended that the recognition of title in appellant followed by the contract of sale and purchase, be a form or device of security for the loan and subsequent advances and replacements.
Finally, it is urged that the findings of fact and the judgment are not supported by the evidence. The evidence is voluminous and, in many respects, in sharp conflict. It would serve no useful purpose to review and attempt to detail *820 the evidence in these respects. The findings made by the trier of the facts in connection with the matters in dispute, are based upon and supported by substantial evidence. This court has repeatedly held that findings made by the trier of the facts, supported by substantial, competent, although conflicting evidence will not be disturbed on appeal. Sec. 13-219, Idaho Code; Driesbach v. Lynch, 71 Idaho 501, 234 P.2d 446; Lanning v. Sprague, 71 Idaho 138, 227 P.2d 347; Hancock v. Halliday, 70 Idaho 446, 220 P.2d 384.
The judgment is affirmed.
Costs to respondent.
GIVENS, C. J., and PORTER, TAYLOR and KEETON, JJ., concur.
