
495 So.2d 61 (1986)
Keenan COFIELD
v.
Jeff SMITH, et al.
84-1298.
Supreme Court of Alabama.
August 29, 1986.
Connie W. Parson, Birmingham, for appellant.
James M. Gaines, Huntsville, for appellees.
HOUSTON, Justice.
The plaintiff, Keenan Cofield, appeals from a summary judgment granted in favor of the defendants, Jeff Smith and Smith, Gaines, Gaines, and Sabatini, P.A., in this action seeking damages for legal malpractice. We affirm.
The undisputed material facts in this case show the following: The defendants are licensed attorneys in this state. In 1978 they represented the plaintiff in a felony prosecution in Madison County which ultimately resulted in the plaintiff's being convicted and sentenced pursuant to a guilty plea, which he entered on December 21, 1978. The plaintiff filed a complaint in the Circuit Court of Madison County on June 11, 1985, alleging that the defendants were negligent in advising him to plead guilty to the offense as stated in the 1978 indictment. This allegation is based upon a 1985 adjudication by the Circuit Court of Jefferson County (Bessemer Division) pursuant to a petition filed by the plaintiff for a writ of habeas corpus. That court determined that the 1978 conviction was based upon a legally defective indictment and could not be used to enhance punishment under Alabama's Habitual Felony Offender Act. (It appears that the plaintiff was convicted of two additional felonies in separate proceedings in 1980 and 1982. Presumably, the 1978 conviction was considered in setting the plaintiff's punishment in those two cases.)
The defendants answered the plaintiff's complaint, denying all of the material allegations and raising the statute of limitations as an affirmative defense. The defendants also filed a motion for summary judgment, which was granted by the trial court.
The sole issue presented on appeal is whether the plaintiff's action is time barred.
Initially we should note that a summary judgment is proper when there is no genuine issue of material fact to be resolved by the jury and the moving party is entitled to a judgment as a matter of law. Rule 56(c), Ala.R.Civ.P. All reasonable doubts concerning the existence of a genuine issue of fact must be resolved against the moving party. Fountain v. Phillips, 404 So.2d 614 (Ala.1981).
*62 Section 6-2-34, Code 1975, provides that "Motions and other actions against attorneys-at-law for ... neglect or omission of duty" must be commenced within six years. Section 6-2-30, Code 1975, requires that "All civil actions must be commenced after the cause of action has accrued within the period prescribed in this article and not afterwards, unless otherwise specifically provided for in this Code."
Chief Justice Torbert, speaking for the Court in Payne v. Alabama Cemetery Ass'n, Inc., 413 So.2d 1067 (Ala.1982), analyzed the Alabama case law relating to the accrual of a cause of action:
"The time when the statute of limitations begins to run was analyzed thoroughly by this Court in Garrett v. Raytheon Co., 368 So.2d 516 (Ala.1979). In that case it was stated that the statute of limitations begins to run in favor of the party liable from the time the cause of action accrues, and the cause of action accrues as soon as the party in whose favor it arises is entitled to maintain an action thereon. 368 So.2d at 518. The plaintiff's ignorance of a tort or injury does not postpone the running of the statute of limitations until that tort is discovered. [See, however, § 6-2-3, Code 1975, creating a `saving clause' for fraud actions.] Kelly v. Shropshire, 199 Ala. 602, 75 So. 291 (1917).
"The statute, however, will not begin to run until some injury occurs which gives rise to a maintainable cause of action. Garrett v. Raytheon Co., 368 So.2d 516 (Ala.1979); Corona Coal Co. v. Hendon, 213 Ala. 323, 104 So. 799 (1925); West Pratt Coal Co. v. Dorman, 161 Ala. 389, 49 So. 849 (1909). As pointed out in Garrett v. Raytheon Co., the basic principles set forth by Corona Coal and West Pratt Coal on one hand, and Garrett v. Raytheon Co. on the other, are the same. In actions such as the case at bar, the act complained of does not itself inflict a legal injury at the time it is done, but plaintiff's injury only follows as a result and a subsequent development of the defendant's act. `In such cases, the cause of action "accrues," and the statute of limitation begins to run, "when and only when, the damages are sustained." Garrett v. Raytheon Co., 368 So.2d at 519. See also, Kelly v. Shropshire, 199 Ala. 602, 75 So. 291 (1917)."
In the present case, the plaintiff argues in his brief as follows:
"In the case at bar, no appreciable injury occurred to the plaintiff until at the earliest, in 1980, where the plaintiff's 1978 case was used to imprison him for more years than the 1980 trial court would have [otherwise] given him. Further subsequent injury occurred in 1982, where the 1978 conviction was used to enhance his sentenc[e] under the Habitual Offender Act."
"...
"There are cases where the act complain[ed] of does not itself constitute a legal injury at the time, but plaintiff's injury only comes as a result of, and in furtherance and subsequent development of, the act defendant has done. In such cases, the cause of action `accrues,' and the statute of limitations begins to run, `when, and only when, the damages are sustained.' Kelly, et al. v. Shropshire, 199 Ala. 602, 75 So. 291 (1917).
"The plaintiff in the case at bar, did not have a cause of action against the defendant until 1985, when Judge Reynolds of the Jefferson County Circuit Court ruled that the 1978 indictment was legally defective...."
We disagree. The plaintiff's argument is premised on the erroneous assumption that no legal injury could have occurred on December 21, 1978 (the date the plaintiff pleaded guilty, allegedly on the advice of the defendants, and was convicted and sentenced under a legally defective indict ment). It was on that date that the plaintiff's cause of action accrued, because it was at that time that the plaintiff would have first suffered a legal injury for which he would have been entitled to commence an action for damages against the defendants. Although the plaintiff's damages may have been compounded subsequently *63 by virtue of the effect which the 1978 conviction had on the punishment enhancement provisions of Alabama's Habitual Felony Offender Act, the statute would, nonetheless, have begun to run on the date the conviction was entered. This is so even though the damages for which the plaintiff now makes claim could not have been fully known at that time. See Garrett v. Raytheon Co., 368 So.2d 516 (Ala.1979). Moreover, in spite of the fact that the plaintiff may not have discovered until 1985 that the 1978 indictment was legally defective, the statute would not have been tolled.
The plaintiff's action is time barred because it was commenced more than six years after the cause of action accrued (i.e., December 21, 1978). Therefore, there being no genuine issue of material fact for resolution by a jury, summary judgment in favor of the defendants was proper.
AFFIRMED.
TORBERT, C.J., and MADDOX, ALMON and BEATTY, JJ., concur.
