— The contract or agreement, for the breach of which this suit was brought, is an obligation by a mortgagee to reconvey certain real estate previously mortgaged to the defendant by the plaintiff. The plaintiff having executed to the defendant a deed to the property, in payment of the mortgage debt, after the law day of the mortgage, and for the evident purpose of avoiding a foreclosure sale of the property, and contemporaneous with said conveyance, the defendant executed the agreement involved, authorizing plaintiff to repurchase the property for the same amount expressed as the consideration in the deed, and interest thereon, but no time limit was put on the agreement as to when the plaintiff should or could repurchase. It is a well-settled rule of law that when no> time of performance is fixed in a contract, it will be presumed that the parties intended a performance within a reasonable time, and what is a reasonable time will be determined by the nature and extent of the undertaking and the particular circumstances surrounding the parties when the contract was made. — Griffin v. Ogletree, 114 Ala. 343, 21 South. 488; Wolfe v. Parham, 18 Ala. 441; 2 Mayfield’s Dig. p. 776.
It is evident from the undisputed facts connected with this transaction and the surroundings of the parties that the deed from the plaintiff, the mortgagor, to the defendant, the mortgagee, was for the purpose of avoiding a foreclosure sale of the land nnder the mortgage, and that the obligation in question was made and intended solely for the purpose of preserving such rights as the plaintiff would have to redeem the property in case it had been sold under- the power, and, this being
*211true, we think, the law fixes two years as a reasonable time within which the plaintiff had to exercise his right to repurchase or redeem the property under the terms of the agreement. This transaction operated as a sale of the property to the defendant by the plaintiff, with the right to repurchase the same upon payment of the amount credited on the mortgage, as the consideration of the deed, with the interest thereon, and not as a mortgage or security for the debt. Its manifest purpose was to do by contract precisely what the law would do for them, to wit, foreclose • the mortgage and preserve the mortgagor’s right to redeem. — Stoutz v. Rouse, 84 Ala. 309, 4 South. 170; Goree v. Clements, 94 Ala. 337, 10 South. 906. The parties could no doubt have contracted for a longer period than two years for the redemption or repurchase of the property, but as they did not do so, and as they fixed no definite time, the contract can only be upheld by fixing a reasonable time for its performance by the operation of law, and which seems to be two years from date of sale in cases analogous to this one. — Alexander v. Hill, 88 Ala. 487, 7 South. 238, 16 Am. St. Rep. 55; Comer v. Sheehan, 74 Ala. 452; Ezzell v. Watson, 83 Ala. 120, 3 South. 309; Stephenson v. Harris, 153 Ala. 462, 45 South. 196.
What is a reasonable time, when no time is fixed by the contract, is sometimes a question of fact for the jury, and sometimes a question of law. Where it depends upon facts extrinsic to the contract,- which are matters of dispute, it is a question of fact; when it depends upon a construction of a contract in writing, or upon undisputed extrinsic facts, it is a matter of law. ■ — -2 Mayfield’s Digest, p. 776, § 377. In the case at bar, the determination of a reasonable time is one of law, and was two years after the conveyance of the property *212by tbe plaintiff to tbe defendant in payment of tbe mortgage debt.
The plaintiff, in order to recover in this case, bad to show a valid and subsisting contract between him and tbe defendant, at tbe time be claims to have made tbe tender, for if there was not a subsisting contract, there was no breach for which be could recover; and, as said alleged tender was not made within two years of tbe making of tbe agreement on tbe part of tbe defendant, tbe contract bad terminated and was of no binding force when tbe tender was made, which was nearly four years afterwards. Tbe defendant was therefore entitled to tbe general charge, which was requested and refused, and tbe action of tbe trial court in setting aside tbe judgment for tbe plaintiff and in granting a new trial can be justified upon this ground alone, if not upon other grounds contained in tbe motion. This point was not a question available only by a plea of tbe statute of limitations or laches, but went to tbe substantive right of tbe plaintiff to recover; that is, to show that be bad a valid and binding contract at tbe time of tbe alleged breach, and which was available under tbe general issue.
Tbe judgment of tbe circuit court is affirmed.
Affirmed.
Dowdell, C. J., and Mayfield and de Graffenried, JJ., concur.