This suit was instituted to recover the value of a piece of machinery which the plaintiff contended was covered by insurance. The trial court, upon facts most of which were stipulated, concluded that the machine was not covered by the policy and denied recovery.
The only question involved is whether the policy, together with its endorsements, is ambiguous. We believe there is an ambiguity which requires a reversal.
The facts are not in contest. Plaintiff operated a grain storage warehouse and elevator. It had purchased from the defendant a policy of insurance with extended coverage. The. face of the policy described the property insured as follows:
“On one story steel and concrete- iron clad, grain warehouse building and machinery, located at 115 1/3 North Front Street, Clayton, New Mexico.”
One of the endorsements to the policy was for “Elevator Building and Grain Form.” This endorsement stated that the building coverage was for the buildings generally as described on the first page of the policy and “fixed and movable machinery, spouts, conveyors, * * * if the property of the building owner; all only while contained in or attached to such buildings or structures.” (Emphasis added.) The machine was a specialized grain loader of a movable type, which was used for loading and unloading grain in or outside the warehouse building, but was usually left outside. On the morning when the loss occurred, the machine was standing outside of the building but close thereto, and the doors of the warehouse were closed. A stolen car crashed into the building, and in so doing also ran into the machine, totally destroying the same. The machine was not in use at the time and was not attached to the building in any way, although the testimony is to the effect that the attachments or extension pipes which were used for the operation of the machine had been detached and were inside of the building.
There are certain .rules of insurance law which we must consider in deciding this case. First, the words in a contract of insurance are given their ordinary meaning, and, where there is ambiguity, the test is not what the insurer intended its words to mean, but what a reasonable person in the position of the insured would understand them to mean. Morton v. Great American Insurance Company, 77 N.M. 35, 419 P.2d 239 (1966); Miller v. Mutual Benefit Health & Acc. Ass’n of Omaha, 76 N.M. 455, 415 P.2d 841, 19 A.L.R.3d 1421 (1966); Scott v. New Empire Insurance Company, 75 N.M. 81, 400 P.2d 953 (1965); and Fowler v. First National *226Life Insurance Co. of America, 71 N.M. 364, 378 P.2d 605 (1963). Secondly, an insurance contract must be considered as a whole; and if the policy is clear and is not ambiguous, the courts have no occasion to construe the terms thereof. Gray v. International Service Insurance Company, 73 N.M. 158, 386 P.2d 249 (1963); and Rigsby v. Mutual of New York, 331 F.2d 353 (10th Cir.1964). Thirdly, that under certain circumstances, the retention and non-objection to the policy by the insured is considered to be an acceptance of its terms. Western Farm Bureau Mutual Ins. Co. v. Barela, 79 N.M. 149, 441 P.2d 47 (1968); Porter v. Butte Farmers Mutual Insurance Company, 68 N.M. 175, 360 P.2d 372 (1961); and Gendron v. Calvert Fire Ins. Co., 47 N.M. 348, 143 P.2d 462, 149 A.L.R. 1310 (1943). Lastly, where an insurance contract is ambiguous, the ambiguity is resolved against the insurer. Vargas v. Pacific National Life Assurance Co., 79 N.M. 152, 441 P.2d 50 (1968); Couey v. National Benefit Life Insurance Company, 77 N.M. 512, 424 P.2d 793 (1967); Fowler v. First National Life Insurance Co. of America, supra; Erwin v. United Benefit Life Insurance Company, 70 N.M. 138, 371 P.2d 791 (1962).
With these rules in mind, we examine the policy before us.
As is usual with insurance contracts, this one is somewhat complex and contains not only the policy itself but two endorsements, which, although perhaps easily understood by one schooled in insurance terms and instruments, might not be so easy for an insured to comprehend, even if he took the trouble to read the same. Here, the coverage stated on the face of the policy had been inserted by typewriter and was obvious, whereas the limiting words, relied upon by the company, are merely a part of seven lines in one paragraph of a finely-printed two-page endorsement, and are, to say the least, obscure. This particular policy appears on its face to insure not only the building but the machinery, and there is no qualification other than the address of its location. However, contrary to what appears on the face of the policy, the endorsement requires that the machinery be inside of the building, or at least attached to it.
We can reach no other conclusion but that the terms of the face of the policy and the endorsement are ambiguous, and that it therefore becomes necessary to construe the policy to determine its coverage. Thus the rule that an insurance contract must be considered as a whole has no applicability in this case, and, to the contrary, the rule requiring ambiguities to be resolved against the insurer comes into play. In this same connection, our decisions with respect to the effect of retaining the policy are not applicable, because here an obvious uncertainty exists as to the coverage of the policy, whereas the cases cited above relative to acceptance by retention did not concern any problem of ambiguity.
It is thus apparent that a conflict exists between the face of the policy and the endorsement attached to it. We are, accordingly, faced with two competing rules of construction. The first provides that the language of an endorsement attached to a policy controls where there is an irreconcilable conflict between the body of the policy and an endorsement. Lax v. Fidelity & Cas. Co., 74 N.M. 123, 391 P.2d 411 (1964). The other is that stated in 13 Appleman, Insurance Law & Practice § 7522, at 249 (1943):
“And the general rule is that while written and printed portions of a policy will be reconciled, if possible, if they are definitely repugnant, the written clauses will be given effect over the printed.”
We hold that the latter rule is controlling when both situations are present, because the insured, having every right to consider the terms of the policy according to their ordinary meaning, would conclude that the machinery was covered. It would require a comprehensive study and understanding of the fine print of the endorsement to determine otherwise, and under the circumstances here present, this is too *227much to expect of the insured as a reasonable person. The defendant could so easily have provided on the face of the policy the provision incorporated in the endorsement, that the machinery must be located within the building. Thus, we resolve the conflict between the policy and the endorsement against the insurer.
The judgment of the trial court will be reversed and the case remanded with instruction to enter judgment in conformity herewith. It is so ordered.
NOBLE, C. J., and COMPTON, J., concur.