
299 S.E.2d 698 (1983)
Michael Randolph WALKER
v.
J.P. MITCHELL, Warden, Etc.
Michael Randolph WALKER
v.
COMMONWEALTH of Virginia.
Record Nos. 811936, 812038.
Supreme Court of Virginia.
January 21, 1983.
Mark D. Mariner, Richmond (Fred A. Talbot, Bremner, Baber & Janus, Richmond, on brief), for appellant.
Jerry P. Slonaker, Asst. Atty. Gen. (Gerald L. Baliles, Atty. Gen., on brief), for appellees.
Before CARRICO, C.J., and COCHRAN, POFF, COMPTON, THOMPSON, STEPHENSON and RUSSELL, JJ.
*699 CARRICO, Chief Justice.
Michael Randolph Walker is here on two appeals, one a belated direct appeal from his April 19, 1974 conviction and life sentence for first degree murder (Record No. 812038), and the other a regular appeal from a denial of a petition for a writ of habeas corpus filed in the court below on December 15, 1980 (Record No. 811936). We consolidated the two cases for argument; they present the single question whether Walker was denied effective assistance of counsel in his criminal trial because of his court-appointed attorney's failure to raise insanity and intoxication defenses.
As an initial matter, we must decide whether a claim of ineffective assistance of counsel is cognizable on direct appeal from a criminal conviction. Walker takes the affirmative in the debate, the Attorney General the negative. We agree with the Attorney General.
Under Rule 5:21, this court will not consider error to a ruling below "unless the objection was stated with reasonable certainty at the time of the ruling ...." It would be a rare case, indeed, where counsel would raise in the trial court, and seek that court's ruling upon, his own inadequacies in representing an accused. In the less rare, but still unusual, case where a change of counsel occurs during the course of a criminal proceeding, it is unlikely that the new lawyer will have an opportunity to discover, let alone seek a ruling upon, the inadequacies of his predecessor before the proceeding terminates.
Rule 5:21 contains a savings clause under which this court, "to attain the ends of justice," may consider a point that has not been the subject of objection below. We believe, however, that, in the interests of both the Commonwealth and the accused, the ends of justice dictate the adoption of a rule restricting to habeas corpus proceedings the litigation of claims of ineffective assistance of counsel.
Usually, such claims involve matters not appearing in the record of a criminal trial. The ordinary trial record is not developed adequately to permit on direct appeal a fair resolution of questions involving ineffective assistance. Yet, a rule that would permit litigation of ineffectiveness claims in criminal cases would inject into such proceedings tangential and confusing issues, consequently diverting attention from the true fact-finding purpose of criminal trials.
Walker argues that an accused should be permitted to pursue a claim of ineffective representation on direct appeal even at the risk of losing the claim on the basis of an insufficiently developed record. The risk in such a course, however, is greater than Walker perceives. The view that would permit an accused to litigate in a criminal trial and on direct appeal a claim of ineffective assistance might run afoul of this court's holding in Slayton v. Parrigan, 215 Va. 27, 205 S.E.2d 680 (1974), cert. denied, 419 U.S. 1108, 95 S.Ct. 780, 42 L.Ed.2d 804 (1975). As a result, an accused who fails to raise such a claim at his criminal trial and on direct appeal or who raises the issue there and loses might be foreclosed from asserting the claim in a later habeas corpus proceeding.
From the standpoint of an attorney charged with ineffective representation, the ordinary criminal trial record is insufficient to show the reasons counsel employed or did not employ a particular trial tactic. Often, actions that appear inexplicable are made readily understandable when the actor is given a chance to explain.
A separate habeas corpus proceeding affords both sides an opportunity to develop fully the factual and legal bases of their positions with respect to a claim of ineffective assistance of counsel. Using affidavits where appropriate (Code § 8.01-660) or a plenary hearing when necessary (Code § 8.01-662), the parties can produce a complete record, one that will permit an intelligent disposition of the habeas petition both in the trial court and on appeal. Of course, if the record of the criminal trial is sufficient itself to show the merit or lack of merit of a habeas petition, the case may be determined upon that record alone. Code § 8.01-654(B)(4).
*700 We hold that Walker is not entitled to have his claim of ineffective assistance of counsel considered in his direct appeal. Accordingly, we will dismiss that appeal as improvidently awarded. This brings us to Walker's appeal in the habeas corpus proceeding.
The record in the habeas case, which includes the criminal trial record, shows that on December 5, 1973, Walker shot and killed his girlfriend, Lenis Demetris New, apparently because she "did [him] wrong." Shortly before the killing, a friend told Walker "about a lot of things that had been going on between Lenis and other people." Walker responded by saying he "should shoot [Lenis] for what [she had] done to him."
After shooting Lenis, Walker turned the gun on himself, inflicting a neck wound. He then walked from the scene of the killing to his brother's home a block away, where he was arrested. He was taken to a hospital for treatment of his wound.
On December 6, an arrest warrant was served on Walker, charging him with the murder of Lenis, and thereafter James T. Wood, a Williamsburg attorney, was appointed to represent him. Upon Wood's motion, the general district court designated a psychiatrist to examine Walker. This doctor reported that Walker was "not mentally ill, [was] cognizant of right and wrong, and [was] capable of entering into his own defense."
The general district court certified the case to the grand jury, which returned an indictment on February 11, 1974. On the same date, Wood was appointed to represent Walker in the proceedings in circuit court.
The case was set for trial on April 19, 1974, without a jury. On April 11, upon Wood's motion, the court appointed another doctor "to perform a psychiatric examination" of Walker. On April 15, this doctor reported in a letter to Wood that Walker was competent to stand trial. In a conversation with Wood, the doctor stated that he could not say whether Walker was sane or insane at the time of the offense.[1]
The trial proceeded as scheduled on April 19. Against Wood's advice, Walker testified in his own defense. He claimed to have little memory of the circumstances of killing Lenis other than hearing shots, noticing the gun in his hand, and saying, "Lord, I done shot my baby ...." He maintained that he had been drinking heavily at the time and that he would not have shot Lenis "if [he] had known what [he] was doing." At the conclusion of the trial on April 19, the court convicted Walker of first degree murder and sentenced him to life imprisonment.
Wood did not offer at the criminal trial any evidence concerning Walker's mental condition or submit any argument on the defenses of insanity and intoxication. This failure was the focus of the inquiry at the habeas corpus hearing.[2]
In that hearing, Walker testified he told Wood before the criminal trial that he had been convicted previously of murder for the 1968 killing of his best friend while both were in the army in Vietnam and that the conviction had been overturned on insanity grounds.[3] Walker informed Wood that, following *701 dismissal of the murder charge, he was sent to the Veterans Administration Hospital in Salem, Virginia, where he was placed in the locked psychiatric ward for "about six months," then put on outpatient status and finally discharged in August, 1972, as "an acute psychotic."
Walker told Wood that the civilian attorney who "had the [Vietnam murder] case overturned" was Scott Jarvis of Topeka, Kansas. On March 8, 1974, some five and one-half weeks before Walker's April 19 trial date, Wood wrote to Jarvis at a Topeka address he obtained from a legal directory. In the letter, Wood asked Jarvis for information that would assist in the preparation of an insanity defense for Walker. The letter was returned with the stamp, "Moved, not forwardable." On March 21, Wood wrote the American Bar Association inquiring about Jarvis and received a reply listing an Ohio address, but this reply was not received until after the completion of Walker's criminal trial.
Wood testified at the habeas hearing that he "thought [he] called [Jarvis] and talked to him on the telephone." It was stipulated, however, that Jarvis would testify if present in court that "no one had contacted him [prior to the conclusion of Walker's trial] concerning the information about Walker that was in his possession."
Wood wrote the Salem Veterans Hospital for Walker's psychiatric record and received a two-page discharge summary approximately six weeks before the criminal trial. The summary showed a diagnosis of "[s]chizophrenia, paranoid type, in partial remission."
Wood also wrote the Department of the Army on March 29, 1974, requesting information concerning Walker's court martial. Wood did not receive the requested material, however, until the latter part of May, 1974, a month or more after the trial terminated.
The Army records received by Wood disclosed that Dr. Dietrich W. Heyder, a psychiatrist practicing in Norfolk at the time of Walker's criminal trial, had rendered an opinion to Scott Jarvis in 1970 indicating Walker was insane at the time of the Vietnam offense. Heyder testified at the habeas hearing; he said he would have been available to testify at Walker's criminal trial and, if called as a witness, would have opined that Walker was insane at the time he killed Lenis New.
Walker also testified at the habeas hearing that two companions joined him in consuming a quantity of alcohol on the day he killed Lenis. He said he gave the names of his companions to Wood before trial, but they were not called as witnesses. One of these companions testified at the habeas hearing, and the testimony of the other was stipulated. According to this testimony, Walker and his two friends consumed a bottle of vodka and "a six-pack" of beer between approximately noon and 3:30 or 4:00 p.m. preceding the 7:45 p.m. shooting of Lenis. The testimony indicated further that neither of these potential witnesses was contacted by Wood.[4] The latter testified at the habeas hearing that "the people [he] talked to [said that Walker] was not intoxicated."
Walker claims that his trial attorney's failure adequately to investigate and develop insanity and intoxication defenses denied him the effective assistance of counsel. We do not reach the merits of Walker's claim, however. As noted earlier in this opinion, Walker was convicted on April 19, 1974. Yet, it was not until December 15, 1980, more than six and one-half years later, that Walker filed his habeas corpus petition and claimed for the first time that his trial counsel had been ineffective. In our opinion, Walker delayed overlong in asserting his claim.
*702 We have not ruled previously upon the question whether undue delay in the filing of a petition for habeas corpus may constitute a bar to relief. On a related point, however, we said in Davis v. Peyton, 211 Va. 525, 528, 178 S.E.2d 679, 681 (1971), that a court is not required to believe the testimony of a prisoner who waits an unreasonable length of time before complaining about the services of his counsel.
The federal courts have a rule directly in point. Rule 9(a) of the "Rules Governing § 2254 [Habeas Corpus] Cases" reads as follows:

Delayed petitions. A petition may be dismissed if it appears that the state of which the respondent is an officer has been prejudiced in its ability to respond to the petition by delay in its filing unless the petitioner shows that it is based on grounds of which he could not have had knowledge by the exercise of reasonable diligence before the circumstances prejudicial to the state occurred.
In an Advisory Committee Note following this rule, it is stated:
Subdivision (a) is not a statute of limitations. Rather, the limitation is based on the equitable doctrine of laches. "Laches is such delay in enforcing one's rights as works disadvantage to another...."
... [I]n Fay v. Noia, 372 U.S. 391 [83 S.Ct. 822, 9 L.Ed.2d 837] (1963), the Supreme Court noted:
[H]abeas corpus has traditionally been regarded as governed by equitable principles. [Citation omitted.] Among them is the principle that a suitor's conduct in relation to the matter at hand may disentitle him to the relief he seeks. 372 U.S. at 438, 83 S.Ct. at 848
....
The standard used for determining if the petitioner shall be barred from asserting his claim is consistent with that used in laches provisions generally. The petitioner is held to a standard of reasonable diligence.
Rule 9(a) was employed as a basis for dismissing a Virginia prisoner's petition for habeas corpus in Silva v. Zahradnick, 445 F.Supp. 331 (E.D.Va.1978). There, the prisoner had waited twenty-one years before bringing his claim of ineffective representation. In the meantime, his trial counsel had died and his appellate counsel had either lost or destroyed his notes. The prisoner offered no reason for his long delay in seeking habeas relief.
In deciding to dismiss the habeas petition, the district court relied upon the case of Johnson v. Riddle, 562 F.2d 312 (4th Cir. 1977). Although not citing Rule 9(a), the Fourth Circuit in Johnson upheld the denial of habeas relief to a Virginia prisoner who waited seventeen years to complain that his counsel, who had since died, had been ineffective in failing to appeal a conviction. The court stated that, in arriving at its decision, it gave "weight to the fact that petitioner makes no effort to explain or to justify the delay." 562 F.2d at 314.
Admittedly, these federal cases differ somewhat from the case at bar; they involved the death of counsel and delay in excess of six and one-half years. But the death of counsel is not a prerequisite to the operation of Rule 9(a); indeed, in Silva, although the trial attorney had died, the appellate counsel whose representation was attacked had not died  he had only lost or destroyed his notes. Neither is the length of the delay conclusive. Although the petitioner in Silva waited twenty-one years to file for habeas relief, the trial attorney died only eight years after the criminal conviction; yet, the court indicated that the filing of a habeas petition would have been impermissibly late "even then." 445 F.Supp. at 333.
As the language of Rule 9(a) indicates, the key considerations in its operation are (1) whether the state has been prejudiced in its ability to defend an ineffective representation claim by reason of the delay in filing a habeas petition, and (2) whether the prisoner is able to show that, in the exercise of reasonable diligence, he could not have known of his habeas grounds before the prejudice to the state occurred. Operating in this fashion, a delay rule must be applied *703 as the doctrine of laches is applied ordinarily, on a case-by-case basis according to the facts in each instance.
Borrowing from the federal experience, we establish this rule of decision for Virginia's courts: where the filing of a petition for habeas corpus claiming ineffective assistance of counsel is so long delayed that the Commonwealth is prejudiced in its defense of the claim, the petition may be dismissed unless the petitioner shows that, in the exercise of reasonable diligence, he could not have known of the grounds for the petition before the prejudice occurred.
Here, in urging that we hold Walker's habeas petition barred by undue delay in filing, the Attorney General states on brief: "It is readily apparent that the Commonwealth was prejudiced in the habeas proceeding by [Walker's] dilatoriness, because defense counsel's recollection was lost in many respects over the years as a result of the delay." And, in denying Walker's habeas petition below, the trial judge observed, inter alia, that "[i]t's easy to say later on... what should have been done at [some earlier] time." The judge stated further that Walker had exceeded "the time to have complained" by waiting "virtually eight years after something occurred ... to come in ... and say so and so should have been done."[5] We agree with the views of both the Attorney General and the trial judge.
We count in Wood's habeas testimony numerous instances of his inability to recall material incidents of the 1974 trial and of the preparation period that preceded it. For example, Wood could not remember how many times he had talked with Walker before trial or how long the interviews lasted; yet, Walker testified glibly that Wood had spent a "very limited amount of time" with him, "never long enough to ... really get into a conversation." For another example, Wood could not remember, because it was "too long ago," whether he had interviewed witnesses "who [had] observed Mr. Walker at the time of the shooting or immediately after." As a result, Wood was unable to contradict the testimony of a witness at the habeas hearing who said she had not been contacted by Wood before the criminal trial; this witness asserted that, if called at the criminal trial, she would have testified Walker acted strangely both before and after the shooting.
Finally, we find nowhere in the record any contention by Walker that, in the exercise of reasonable diligence, he could not have known of the grounds for his habeas petition before the prejudice to the Commonwealth occurred. Indeed, for Walker to make such a contention would be frivolous. He knew from the very moment of his conviction and sentence that Wood had not interposed on his behalf defenses of insanity and intoxication. Thus, Walker knew then all he needed to know to file a habeas petition within a reasonable time after his conviction; yet, he waited, as the trial judge observed, until "the memory of man runneth not to the contrary."
Because we hold that the filing of Walker's petition for habeas corpus was unduly delayed, we will affirm the judgment in the habeas proceeding.
Appeal dismissed in Record No. 812038.
Judgment affirmed in Record No. 811936.
NOTES
[1]  This psychiatrist and the one who examined Walker pursuant to the order of the general district court testified at the habeas hearing that they believed Walker was sane at the time of the offense.
[2]  Walker complains on brief that Wood failed to request a presentence report at the criminal trial. This was not included among Walker's complaints in the habeas proceeding, and we will not consider the point now. Rule 5:21.
[3]  In a 1968 general court martial in Vietnam, Walker was convicted of premeditated murder. The United States Army Court of Military Review reduced the charge to unpremeditated murder. In 1971, the United States Court of Military Appeals reversed the conviction and returned the case to the Court of Military Review for further inquiry into Walker's sanity. United States v. Walker, 20 U.S.C.M.A. 241, 43 C.M.R. 81 (1971). In 1972, the commanding general at Fort Leavenworth, Kansas, dismissed the charge because of the government's inability to prove beyond a reasonable doubt that Walker was "so far free from mental disease" at the time of the offense that he could not "distinguish right from wrong and ... adhere to the right." This is the burden imposed by military law upon the prosecution, once evidence of lack of mental capacity is introduced. Of course, in Virginia, the burden is upon the accused to prove an insanity defense. Taylor v. Commonwealth, 208 Va. 316, 322, 157 S.E.2d 185, 189-90 (1967).
[4]  Before the criminal trial commenced, Walker was asked by the trial court whether "[a]ny of [his] witnesses [were] missing." Walker replied, "I don't have any witnesses."
[5]  The judge's reference to "virtually eight years" meant the period between the date of the killing and the time of the habeas hearing.
