
454 P.2d 963 (1969)
80 N.M. 306
E.O. SPURLIN, Plaintiff-Appellant,
v.
PAUL BROWN AGENCY, INC., Defendant-Appellee.
No. 8730.
Supreme Court of New Mexico.
May 12, 1969.
Rehearing Denied June 10, 1969.
Neal & Neal, Tom W. Neal, Hobbs, for appellant.
Lowell Stout, Hobbs, for appellee.

OPINION
COMPTON, Justice.
This is an appeal from an order of the district court dismissing the plaintiff's complaint alleging that the defendant negligently failed to obtain liability insurance covering a motor vehicle belonging to him on the ground that the action was barred by the statute of limitations.
We summarize the complaint. In June, 1961, the appellee orally agreed to obtain liability insurance covering the vehicle in question. Thereafter, on December 3, 1962, the appellant's vehicle was involved in an accident with a vehicle owned by Virginia and O.R. Price, and the appellant immediately notified appellee of the accident. On December 7, 1962, appellee advised appellant that there was no insurance coverage on his vehicle.
On July 9, 1964, the Prices brought an action for damages against the appellant. On July 21, 1964, the appellant made demand upon the appellee to defend the suit against him, which appellee refused. Subsequently appellant settled with the Prices and, on June 8, 1967, instituted this action against appellee for damages for its negligent failure to obtain the policy. Appellee pleaded contributory negligence and the statute of limitations as a defense.
The pertinent provisions of the applicable statutes, §§ 23-1-1 and 23-1-4, N.M.S.A. 1953, read:
"23-1-1. The following suits or actions may be brought within the time hereinafter limited, respectively, after *964 their causes accrue, and not afterwards, except when otherwise specially provided."
"23-1-4. * * * all other actions not herein otherwise provided for and specified within four [4] years."
The accrual date of the cause of action is the decisive question to be determined. The trial court found that "the alleged oral contract of insurance or the alleged negligence of defendant to obtain insurance for the plaintiff, which is the basis of plaintiff's action occurred in June, 1961," and concluded that the cause of action having accrued more than four years prior to the commencement of the action, the complaint should be dismissed. It is thus not clear whether the trial court treated the action as one for breach of contract, or an action for negligence sounding in tort. However, since the parties briefed the question as though the action was based on negligence, we will so treat it.
Appellant contends that the statute of limitations did not begin to run until he was sued by the Prices on June 9, 1964. He argues that appellee's negligent failure to obtain the insurance policy did not give rise to an action for damages until injury was sustained as a result of such negligent act. In other words, he contends that until the suit, which charged him with liability, was filed, no cause of action existed. Appellee on the other hand contends that the statute of limitations began to run in June, 1961, the date of the accident, or, at the very latest, on December 7, 1962, when appellant was advised that there was no insurance coverage on the automobile.
We agree with appellant. Liability insurance does not purport to provide compensation for injuries, but only to protect the insured against legal liability. While the statute of limitations began to run when the cause of action accrued, there was no cause of action for negligence until there had been a resulting injury. Jensen v. Allen, 63 N.M. 407, 320 P.2d 1016. The cause of action arising out of the negligent failure to obtain liability coverage could only accrue when legal liability materialized June 9, 1964, when the Price suit was filed, and this only because a policy of insurance such as appellee allegedly failed to furnish would have provided for the insurance company to furnish a defense. Compare Satterwhite v. Stoltz, 79 N.M. 320, 442 P.2d 810 (Ct.App.1968). Otherwise the loss would have accrued only after judgment had been entered against appellant, Kroblin Transfer v. Birmingham Fire Ins. Co., 239 Iowa 15, 30 N.W.2d 325, or possibly when settlement had been made, or a judgment paid. Northwest Airlines v. Glenn L. Martin Co., 161 F.Supp. 452 (D.C., Md. 1958); Mansfield v. Federal Services Finance Corporation, 99 N.H. 352, 111 A.2d 322. To hold that appellant suffered injury as a result of appellee's negligence on the date of the accident would be pure speculation as there might have never been a claim of legal liability filed against him. Compare Mansfield v. Federal Services Finance Corporation, supra; Bentley v. Fayes, 260 Wis. 177, 50 N.W.2d 404, 29 A.L.R.2d 205; Austin v. Fulton Insurance Co., 444 P.2d 536 (Alaska 1968).
Appellee raises a jurisdictional question claiming that the appeal was from the decision of the court, not from an order or a judgment. The decision of the court was entered May 31, 1968. The order dismissing the action was entered June 21, 1968. The notice of appeal was filed June 26, 1968. While the notice of appeal was from the decision of the court, it gave appellee reasonable notice of appellant's intention to appeal, and appellee was not in any manner misled. Baker v. Sojka, 74 N.M. 587, 396 P.2d 195. Appellee relies on Bouldin v. Bernard, 78 N.M. 188, 429 P.2d 647 and Curbello v. Vaughn, 76 N.M. 687, 417 P.2d 881. These cases are not in point as they relate to premature appeals. Here, a judgment had been entered when the notice of appeal was taken.
We conclude that the cause of action is not barred. The issues raised by the complaint are yet to be determined. The order should be reversed with direction to the *965 trial court to reinstate the case upon its docket and proceed in a manner not inconsistent with this opinion.
It is so ordered.
MOISE and TACKETT, JJ., concur.
