
150 Cal.App.3d 1015 (1984)
198 Cal. Rptr. 384
THE PEOPLE, Plaintiff and Respondent,
v.
MARK HORNING, Defendant and Appellant. In re MARK HORNING on Habeas Corpus.
Docket Nos. A018394, A023598.
Court of Appeals of California, First District, Division One.
January 19, 1984.
*1017 COUNSEL
Quin Denvir, State Public Defender, under appointment by the Court of Appeal, and George L. Schraer, Deputy State Public Defender, for Defendant and Appellant and Petitioner.
John K. Van de Kamp, Attorney General, John B. Moy and David D. Salmon, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
NEWSOM, J.
Appellant seeks reversal of a conviction of robbery (Pen. Code, § 211), claiming, inter alia, incompetence of trial counsel. In salient part the factual background is as follows.
During the summer of 1979, appellant performed general maintenance work for James Sears for about a month. While so employed, he occupied an apartment inside the barn located on Sears' property in Monterey County.
Sears became dissatisfied with appellant's work and fired him, whereupon appellant, angered, refused to leave the premises. After a week, appellant left, warning Sears that "he always got even with people he thought didn't do him right."
On March 5, 1981, just before noon, two men drove onto Sears' property in a red Datsun pickup truck which looked to Sears like the one owned by appellant. Two men were in the truck; one of them, later identified by Sears as appellant's brother Danny, approached Sears and asked for a job. The other, described by Sears only as having a dark, heavy beard, waited in the truck. Danny's erratic, aggressive behavior frightened Sears. After a brief conversation, however, the two men left.
*1018 On the same day, between 6 and 6:30 p.m., Sears went to his barn to work, as was his custom. As he entered the barn, he was struck on the head from behind with a five-pound hammer, then hit again as he fell. The assailant, whose voice "sounded like Danny's," after threatening to shoot Sears with a large revolver, asked if the "Dobie" would bite - a reference to Sears' dog in terms the victim had heard only appellant use. The intruder took Sears' checkbook, watch and wallet, including a $100 bill and credit cards, tied Sears up and left.
Later that same evening, appellant and Danny, accompanied by one Michael Wolfe were detained by a sheriff's deputy who observed the appellant's vehicle stopped in the middle of the road with its lights off. Noticing a revolver placed on the dashboard of the vehicle, and recalling an earlier broadcast of a red Datsun pickup wanted in connection with an armed robbery, the officer called for assistance and continued his investigation. Appellant admitted ownership of the gun and explained that he was a correctional officer at Soledad. The gun was returned to him, and he and Wolfe were released. Danny was arrested on outstanding traffic warrants and taken to jail.
According to Wolfe, he and appellant then drove to the latter's mobile trailer, where appellant got the cash needed to bail out Danny by about 10:30 p.m.
On March 9, 1981, appellant and Danny rented a trailer from a service station in Salinas, paying for this transaction with a $100 bill. The next day, Danny returned to the station and made two purchases with Sears' credit card, signing Sears' name on the receipts.
On March 11, appellant and Danny travelled to Idaho with Danny's wife and another woman, using the rented trailer. In Idaho, they were arrested. Appellant waived extradition and was returned to Salinas.
On March 22, Detective Gordon Sonne of the Monterey County Sheriff's office interrogated appellant. The latter admitted visiting Sears' residence with Danny on March 5 when Danny asked for a job, but claimed he had not seen Sears since that time. Appellant claimed to have been with his girlfriend at the time Sears was robbed; he also explained that the $100 bill used to pay for the trailer had been a wedding gift to Danny, a fact later verified by Detective Sonne.
Based upon this evidence, on March 13, 1981, appellant was first charged with robbery (Pen. Code, § 245), assault with a deadly weapon (Pen. Code, § 245, subd. (a)) and receiving stolen property (Pen. Code, § 496) by complaint *1019 (No. 006373) filed in Monterey County Municipal Court. On May 8, 1981, the charges were dismissed pursuant to Penal Code section 871 (insufficient evidence), apparently at the request of the prosecutor.
In November of 1981, the police became aware, through information supplied by Michael Wolfe, of certain previously undisclosed incriminating statements made by appellant and Danny on the night of the robbery. Thereafter, on November 23, 1981, the prosecutor refiled the same charges by complaint in municipal court. After a preliminary examination, the magistrate again found insufficient evidence to hold appellant to answer on the robbery and assault charges. Those charges were dismissed pursuant to Penal Code section 871, but appellant was held to answer on the charge of receiving stolen property.
On April 12, 1982, the prosecutor filed an information in superior court, charging all three offenses. Before his arraignment on April 16, appellant retained counsel and told him of the first complaint and subsequent dismissal of the charges.
According to trial counsel's affidavit filed in support of the petition for writ of habeas corpus, he reviewed the transcript of the preliminary examination held on the second complaint and discovered that the magistrate had dismissed the robbery and assault charges on grounds of insufficient evidence.[1] Thereafter, counsel researched the law, particularly Penal Code sections 995 and 1387, and concluded that the charges had not been twice dismissed within the meaning of section 1387 because the first dismissal was not based upon a finding of fact adverse to the People.
Counsel subsequently prepared a section 995 motion to set aside the information on grounds of insufficient evidence, which he presented at a pretrial conference on May 10, 1982.[2] The court denied the motion as untimely, and did so again when appellant renewed it on the first day of trial.
On May 25, 1982, the trial court granted appellant's motion for acquittal (Pen. Code, § 1118.1) of the aggravated assault and receiving stolen property charges. After jury trial, appellant was found guilty of the remaining charge (robbery) as an aider and abettor.
(1a) Appellant claims that his trial counsel failed to provide him with adequate representation as a result of a negligent failure to seek dismissal of the charges with prejudice pursuant to Penal Code section 1387.
*1020 (2) "`It has long been recognized that the right to counsel is the right to effective assistance of counsel.'" (People v. McKenzie (1983) 34 Cal.3d 616, 626 [194 Cal. Rptr. 462, 668 P.2d 769].) The California Supreme Court noted that "the role of defense attorney requires that counsel `serve as the accused's counselor and advocate with courage, devotion and to the utmost of his or her learning and ability....'" (Id., at p. 631.)
(3) In People v. Pope (1979) 23 Cal.3d 412, 425 [152 Cal. Rptr. 732, 590 P.2d 859, 2 A.L.R.4th 1], our high court enumerated a two-step test for determining inadequacy of counsel on appeal: Appellant must show that trial counsel failed to act in a manner to be expected of reasonably competent attorneys acting as diligent advocates. In addition, appellant must establish that counsel's acts or omissions resulted in withdrawal of a potentially meritorious defense. (See also People v. Fosselman (1983) 33 Cal.3d 572, 581 [189 Cal. Rptr. 855, 659 P.2d 1144]; People v. Frausto (1982) 135 Cal. App.3d 129, 138-139 [185 Cal. Rptr. 314].) It is also well settled that a conviction will be reversed on appeal for incompetent representation "only if the record on appeal affirmatively discloses that counsel had no rational tactical purpose for his act or omission. In all other cases the conviction will be affirmed and the defendant relegated to habeas corpus proceedings at which evidence dehors the record may be taken to determine the basis, if any, for counsel's conduct or omission." (Fosselman, supra, at p. 582, citing Pope, supra, at pp. 425-426.)
As earlier noted, appellant's trial counsel failed to move for dismissal of the robbery charge under section 1387, which provides, in pertinent part, that "[a]n order terminating an action pursuant to this chapter, or section 859b, 861, 871, or 995, is a bar to any other prosecution for the same offense if it is a felony ... and the action has been previously terminated pursuant to this chapter, or Section 859b, 861, 871, or 995...." The robbery charge against appellant had been dismissed twice by the magistrate pursuant to Penal Code section 871, but after the second dismissal he was held to answer on the receiving stolen property charge, and the prosecutor included the robbery count in the subsequently filed information. According to Ramos v. Superior Court (1982) 32 Cal.3d 26, 34 [184 Cal. Rptr. 622, 648 P.2d 589], the second dismissal of the robbery count by the magistrate was "`an order terminating an action'" within the meaning of section 1387, even though only a portion of the criminal complaint was twice dismissed. (See also Lee v. Superior Court (1983) 142 Cal. App.3d 637, 640 [191 Cal. Rptr. 361]; People v. Crowder (1982) 136 Cal. App.3d 841, 847-848 [186 Cal. Rptr. 469].)
(4) Respondent submits that the "new evidence" exception in section 1387 vitiates appellant's claim of incompetency, reasoning as follows. Section *1021 1387 specifically provides that an order terminating an action following a prior dismissal is not a bar to any subsequent proceeding "where subsequent to the dismissal of the felony ... the judge or magistrate finds that substantial new evidence has been discovered by the prosecution which would not have been known through the exercise of due diligence at or prior to the time of termination of the action...."[3] This exception the Attorney General interprets as applying where, as here, the "new evidence" is discovered in the interval between a first and second dismissal. Thus, in the case at bench, the new evidence consisted of Wolfe's disclosure of appellant's self-incriminating statements made in November of 1981, after the first complaint had been dismissed.
In the Attorney General's view, once new evidence is discovered, following dismissal of a criminal complaint, the People are entitled to an additional two dismissals before section 1387 bars further prosecution of the action.
We disagree. Applying the new evidence exception in the manner urged by the Attorney General would reduce the relevant language of section 1387 to mere surplusage, since the prosecution remains free to file new charges after a first dismissal without resort to the new evidence exception.
The statutory purposes underlying section 1387 were the prevention of prosecutorial harassment and forum-shopping. (Landrum v. Superior Court (1981) 30 Cal.3d 1, 14 [177 Cal. Rptr. 325, 634 P.2d 352].) Obviously these purposes would be subverted by permitting the prosecutor to use the new evidence exception to save a case which would otherwise be barred. Our opinion is that section 1387 was not intended to provide the prosecution *1022 with several opportunities to present new evidence; rather, it provides for the resurrection of a twice-dismissed case if new evidence comes to light.
(1b) Accordingly, since the new evidence exception has no application here, the failure to make a section 1387 motion for dismissal deprived appellant of a meritorious defense to the charges against him and objectively establishes incompetency of counsel,[4] by the sense that counsel's error - however understandable - deprived appellant of a meritorious defense of the charges.
Respondent argues that defense counsel was not incompetent for failure to bring such a motion, because of the unclarity of the law prior to our high court's decision in Ramos v. Superior Court, supra, 32 Cal.3d 26, filed after appellant's trial. Before Ramos, no appellate decision had definitively ruled that dismissals based upon reasons other than insufficiency of the evidence or a fact finding adverse to the People constituted "terminations" within the meaning of section 1387. And the Attorney General argues that, since consistent with the opinion of this court in People v. Encerti (1982) 130 Cal. App.3d 791 [182 Cal. Rptr. 139], section 739 "permitted the refiling of any charges `shown by the evidence' whether or not they had been twice dismissed," counsel might competently have believed that a motion pursuant to section 1387 motion would have been unavailing.
But the Attorney General's reliance on Encerti is misplaced, for the reason Encerti did not confront the issue of twice dismissed charges under section 1387. Instead, there we merely held that the then recently enacted section 871.5  which grants to the prosecution rights of appeal from a magistrate's dismissal of charges  did not implicitly abolish the long-standing statutory right of the prosecution to add to an information offenses established by evidence adduced at the preliminary examination. (Id., at p. 798.)
We recognize that at the time of trial, defense counsel did not have the benefit of Ramos, or any other decision which assured him that a section 1387 dismissal could be obtained. (5) And it is not an element of competent representation that counsel have the prescience to anticipate California Supreme Court decisions. (People v. Criscione (1981) 125 Cal. App.3d 275, 295 [177 Cal. Rptr. 899]; People v. Ceballos (1980) 107 Cal. App.3d 23 [165 Cal. Rptr. 430]; People v. Russell (1980) 101 Cal. App.3d 665, 668 [161 Cal. Rptr. 735].)
*1023 (1c) Nonetheless, even without the guidance of Ramos, the literal terms of section 1387 in our view required defense counsel to attempt the motion for dismissal. California case law suggests that a reading of section 1387 alone should have prompted counsel to make a motion to dismiss under the circumstances presented here. For example, in Lee v. Superior Court, supra, 142 Cal. App.3d 637, a first dismissal followed the improper denial of a motion for continuance of the preliminary hearing. Thereafter, a conspiracy count (Pen. Code, § 182, subd. 1), was dismissed.[5] Holding that the changes were "twice-dismissed" within the obvious meaning of section 1387, the court observed that: "[A] plain reading of the statute does not make any distinction as to the reason of the dismissal. The fact [that] the exceptions to the operation of the statute deal with procedural rather than substantive questions leads to the inescapable conclusion that all dismissals, whether on the merits or for procedural deficiencies, are included." (Id. at p. 640; italics added.) Certainly, in light of the broad language of the statute, it would have taken no prescience on the part of counsel to move for dismissal and argue that section 1387 has unlimited application to all terminations. In our view, competency dictated that the motion should have been made. And since we can discern no plausible tactical reason for counsel's failure to make it, we find incompetence to be established by the record on appeal.
The judgment is reversed and the case remanded to the trial court. The writ of habeas corpus is denied, as moot.
Racanelli, P.J., and Elkington, J., concurred.
Petitions for a rehearing were denied February 17, 1984, and the opinion was modified to read as printed above.
NOTES
[1]  The appeal and petition for writ of habeas corpus have been consolidated for purposes of this opinion. Although we need not reach the petition, we discuss its factual basis only in order to provide a background for our discussion.
[2]  It was counsel's intention to file a section 1387 motion to dismiss the charges with prejudice in the event of a favorable ruling on the section 995 motion - which he felt would have constituted a second dismissal in accordance with section 1387.
[3]  In full, section 1387 provides: "An order terminating an action pursuant to this chapter, or Section 859b, 861, 871, or 995, is a bar to any other prosecution for the same offense if it is a felony or it is a misdemeanor charged together with a felony and the action has been previously terminated pursuant to this chapter, or Section 859b, 861, 871, or 995, or if it is a misdemeanor not charged together with a felony, except in those felony cases, or those cases where a misdemeanor is charged with a felony, where subsequent to the dismissal of the felony or misdemeanor the judge or magistrate finds that substantial new evidence has been discovered by the prosecution which would not have been known through the exercise of due diligence at or prior to the time of termination of the action or that the termination of the action was the result of the direct intimidation of a material witness, as shown by a preponderance of the evidence.

"However, if the previous termination was pursuant to Section 859b, 861, 871, or 995, the subsequent order terminating an action is not a bar to prosecution if either:
"(a) Good cause is shown why the preliminary examination was not held within 60 days from the date of arraignment or plea.
"(b) The motion pursuant to Section 995 was granted because of (1) present insanity of the defendant or (2) a lack of counsel after the defendant elected to represent himself or herself rather than being represented by appointed counsel."
[4]  We stress "objectively" for it is appropriate to add that, given the uncertainty of the law prior to the Ramos decision, as well as the otherwise vigorous defense of the case, we are reluctant to criticize an obviously able practitioner.
[5]  The latter charge had been included in an information filed after the defendant had been held to answer on a solicitation for murder charge. (Pen. Code, § 653f, subd. (b).)
