
461 P.2d 437 (1969)
John E. McDONALD and Helen F. McDonald, Plaintiffs in Error,
v.
The LAKEWOOD COUNTRY CLUB, A Colorado Not For Profit Corporation, Walter S. Robinson, Edward N. Juhan, District Attorney for the First Judicial District, State of Colorado, George Aucoin, as a Deputy District Attorney for the First Judicial District, State of Colorado, Maryland Casualty Company, a Maryland corporation authorized to do business in the State of Colorado, and John R. Gardner, Defendants in Error.
No. 22444.
Supreme Court of Colorado, En Banc.
November 17, 1969.
As Modified on Denial of Rehearing December 15, 1969.
*438 Francis R. Salazar, Robert L. Pitler, Denver, for plaintiffs in error.
*439 Walter F. Scherer, Denver, for defendants in error, Lakewood Country Club, Walter S. Robinson, and John R. Gardner,
F. Richard Hite, Ronald F. Flader, Denver, for defendants in error Edward N. Juhan, George Aucoin, and Maryland Casualty Co.
GROVES, Justice.
The parties appear here in the same order as in the trial court. In the action the plaintiff husband, referred to herein as plaintiff, sought damages for false arrest, false imprisonment, malicious prosecution, libel and slander; and plaintiff wife sought damages for emotional disturbance resulting from the same alleged treatment of her husband. The trial court sustained motions to dismiss most of the claims contained in the plaintiffs' complaint, and it is to these rulings the writ of error is addressed.
The following factual situation appears from the allegations of the complaint: The plaintiff, a non-member of the defendant Lakewood Country Club, went to the club to ascertain from the manager whether he might make a reservation for a dinner party. In seeking out the manager the plaintiff went through the club locker room. After conducting his business with the manager the plaintiff started to depart by again going through the locker room. At this time defendant Robinson, employee of the club, accused plaintiff of stealing currency from a wallet in one of the lockers in the locker room. He ordered the plaintiff to remain on the premises. The club manager and sheriff's officers were called to the scene. The locker was examined and it was found that the missing currency was "in another part of the locker and not in the occupant's wallet."
The owner of the money refused to sign a complaint. Immediately thereafter the officers took plaintiff into custody. The defendant district attorney and deputy district attorney filed an information against the plaintiff, charging him with grand larceny. On trial the plaintiff was acquitted. The judge who presided at the criminal trial was also the trial judge of the present matter.
Maryland Casualty Company was brought into the case as surety upon the bond of the defendant Juhan as district attorney.

I
In sustaining the motions to dismiss in several particulars the trial judge based his decision in part upon the evidence in the criminal case. For example, when commenting upon the allegations of malicious prosecution the trial court made the following rather surprising statements:
"But there certainly during that [criminal] trial was no malice claimed or any shown as might be hinted or indicated that the club members themselves were ready to just jump on anybody. Robinson was on the stand for quite some time and testified directly as to what he saw in the presence of the plaintiff here, the defendant there, in the locker room. The other member defendants in this case testified as to what was said and what was done. And the testimony of the officer is he first saw the defendant McDonald, the bulge in his pockets and then the crumpled money that was down on the bottom of the locker, which negates any inference, at least in that trial, of any malice by these members who happened to be returning from a golf game or who happened to be in the locker room at that time.
"Counsel talks about false imprisonment of four days the defendant in the other case, McDonald, remained in custody. The Court feels this matter certainly should have been brought up in the criminal case. I find no notations of any requests or any statement on behalf of the defendant there concerning this matter. The Court finds no writs or applications for writ of habeas corpus or anything of that nature in the file. Nothing was mentioned concerning this during the trial of the other case, and I think that is the proper place for it. The file in the *440 other case does show the Information was filed on September 29th, 1965, bail fixed at $3,500 by another judge in this district, and that on the next day the defendant McDonald in that case, the plaintiff here, appeared before this Court and a personal recognizance bond was granted, and that bond was granted, and that bond stayed in effect until after the trial.
"The only thing in the trial that seemed unusual was the fact that one day of the trial, I believe it was the second day, his wife became very ill in the corridor, and the doctor thought perhaps she was suffering a heart attack, so the Court allowed the defendant to go along with her, and we recessed Court. But certainly that was, I think, to the advantage of the defendant and certainly wouldn't be to his detriment. It delayed cases in the court, but the Court wasn't bothered by that and the jury weren't affected by it, so there wasn't any problem in that matter."
It is fundamental that, in passing upon a motion to dismiss a complaint, the court can consider only matters stated therein and must not go beyond the confines of the pleading. Gayton v. Department of Highways, 149 Colo. 72, 367 P.2d 899.

II
In reviewing the action of the trial court in dismissing a complaint for failure to state a claim, the appellate court is in the same position as the trial judge. Accordingly, we now proceed to examine and pass upon each of the six statements of claim contained in the complaint which are here involved.
In the first statement the plaintiff asserted a claim against the club and Robinson for false imprisonment and false arrest. There were allegations to the following effect: that the plaintiff was accosted by Robinson and was told to stop; that after the plaintiff explained to Robinson the reason for his presence in the locker room Robinson still questioned plaintiff; that without any probable cause or basis whatsoever Robinson and another club employee ordered plaintiff to remain on the premises while a deputy sheriff was being called; that plaintiff was required to accompany Robinson, the other employee and the deputy sheriff to the locker room to examine the locker; and that the defendants, "in perpetrating the said false arrest and imprisonment of [plaintiff], were intentional or in willful and wanton disregard of the rights and feelings of the plaintiff."
These averments were sufficient to state a claim of false imprisonment or false arrest. See Crews-Beggs Dry Goods Co. v. Bayle, 97 Colo. 568, 51 P.2d 1026 and Kettelhut v. Edwards, 65 Colo. 506, 177 P. 961. In Kettelhut, 1 Cooley on Torts, at 296, (3d ed. 1964) was quoted as follows:
"False imprisonment consists in imposing, by force or threats, an unlawful restraint upon a man's freedom of locomotion. Prima facie any restraint put by force or fear upon the actions of another is unlawful and constitutes a false imprisonment, unless a showing of justification makes it a true or legal imprisonment."
In Crews-Beggs, whose facts are somewhat analogous to the present case, it was stated: "Without a showing of justification, any restraint, either by force or fear, is unlawful and constitutes a false imprisonment."
The trial court, in dismissing as to the club, expressed the following erroneous concept: "I am quite certain that the law is that a company or corporation is not liable for the tortious acts of its agents or employees, and I think that holds here." On the contrary, the acts of a corporate employee, if within the scope of his employment, make the doctrine of respondeat superior applicable. Packaging Corporation of America v. Roberts, Colo., 455 P.2d 652 and Meek v. Smith, 59 Colo. 461, 149 P. 627. The motion should have been denied as to the first statement of claim in so far as the club and Robinson were involved.


*441 III
In the second statement of claim the plaintiff attempted to set forth a claim in malicious prosecution against the club, Robinson, Gardner, and the defendants Juhan and Aucoin in their respective official capacities of district attorney and deputy district attorney. There were allegations to the following effect: that the criminal case was maliciously and willfully instituted by Juhan at the instance and by the insistence of the club and Robinson; that all of such defendants acted without any semblance of right, without any provocation and without any probable cause; that the action was maliciously instituted by "the Defendants"; that Aucoin prosecuted the case, although he well knew that the charge was without foundation or right; that at the trial the defendants Robinson and Gardner testified against the plaintiff, although they well knew the charge brought was without foundation; that the testimony of such defendants implicating the plaintiff was false, as was well known to them, and was given maliciously "as part and parcel of the scheme of said Defendants to find a scapegoat for thefts which had been occurring"; and that in prosecuting the trial the defendants acted maliciously, intentionally, and were guilty of wanton and willful disregard of the rights and feelings of the plaintiff.
Except as to the district attorney and deputy district attorney, the second statement of the complaint states a claim in malicious prosecution against the other defendants involved, and the trial court should have so ruled. Suchey v. Stiles, 155 Colo. 363, 394 P.2d 739; and Montgomery Ward & Co. v. Pherson, 129 Colo. 502, 272 P.2d 643; 34 Am.Jur., Malicious Prosecution § 2, at 703. It may be that as in Pherson the evidence will show probable cause justifying a directed verdict in favor of the defendants (and the same may be true as to other claims involved); but here we are concerned only with the allegations of the complaint which for the purpose of the motions to dismiss are to be taken as true. Martinez v. Southern Ute Tribe, 150 Colo. 504, 374 P.2d 691.

IV
So far as we are advised this court has not passed on the question of whether a prosecuting attorney, while acting as such, can be held liable for malicious prosecution. While in Pherson, supra, the opinion refers to the "prosecutor," the record in that case discloses that neither the district attorney nor any member of his staff was a party, and by the term "prosecutor" reference was made to the complaining witness. The second statement of claim, in so far as it affects the district attorney and deputy district attorney, relates solely to acts done in their official capacity; and there is no allegation that they acted outside the scope of their offices nor that they acted in an individual capacity. The predominant view is that prosecuting attorneys are not liable in a civil action for malicious prosecution where they act in their official capacity, even though they act with malice and without probable cause. Kostal v. Stoner, 10 Cir., 292 F.2d 492; Creelman v. Svenning, 67 Wash.2d 882, 410 P.2d 606; Annots., 118 A.L.R. 1450, 56 A.L.R. 1255 and 34 A.L.R. 1504. We adopt this rule. This privilege does not embrace a situation of a prosecutor acting clearly outside the duties of his office. At first blush such a doctrine may appear as a license to a prosecutor to act with malice and without probable cause. However, the rationale is that, if the rule were otherwise, it would be difficult to obtain competent prosecuting attorneys because a malicious prosecution charge might follow any acquittal and, more particularly, any dismissal on the prosecutor's motion. Further, without such a rule a district attorney could well conclude to prosecute only the "airtight" cases. The remedy for corrupt discharge of a district attorney's duties is in our criminal statutes. C.R.S. 1963, 40-7-46. We hold that the trial court correctly dismissed the second statement *442 of claim as against the district attorney and deputy district attorney.

V
The third statement of claim incorporated the allegations of the first and second claims and alleged that plaintiff was an invitee upon the premises of the club, which thereby owed plaintiff a duty not to commit intentional wrongs against him; and that the damage caused the plaintiff by the false arrest and malicious prosecution was a direct and proximate result of the violation of this duty. We are unable to see that this statement of claim adds anything to the first and second statements of claim, nor that any different rights or violations thereof are involved. Either certain defendants are liable for false arrest or malicious prosecution or both, or they are not. We fail to see the materiality of whether the plaintiff was an invitee, licensee or even trespasser. The trial court made no ruling on the motions to dismiss as to each statement of claim, but rather sustained generally the motions as to named defendants. Since the motion was sustained as to the club, this of necessity means that the court dismissed the third statement of claim. It was correct in so doing.

VI
In the fourth statement of claim it was alleged that the defendant Gardner slandered the plaintiff by making false statements in open court. An adequate claim in slander was not thereby stated as it is predicated upon testimony in open court, which is privileged. Renner v. Chilton, 142 Colo. 454, 351 P.2d 277; Glasson v. Bowen, 84 Colo. 57, 267 P. 1066; 33 Am. Jur., Libel and Slander § 181.
It appears that in some jurisdictions the testimony must be material to the case in which it is given in order for it to be privileged. It is unnecessary for us to consider this point as it appears from the allegations of the complaint that the testimony of the defendant Gardner was material in the trial of the plaintiff for grand larceny. We approve of the dismissal of the fourth claim as to Gardner.

VII
The fourth statement of claim further alleged slander committed by the club and the defendant Robinson. As to Robinson it was alleged: that he accused plaintiff falsely and without any basis whatsoever, as he well knew, of theft; and that he "committed said slander at numerous times and in the presence of numerous persons, including making of said statement in open court sometime between the 11th and 14th days of January A.D., 1966." As to the country club it was alleged that the defendant Robinson and another employee in making such statements were "purporting to act in the interests of said Club, and were acting within the scope of their employment."
Counsel for the club and Robinson argue merely that a privileged communication was involved, i. e. that all statements were made in the course of judicial proceedings. On the contrary, while it was alleged that the slander included accusations repeated in open court, the pleading does not limit the statements to those made in court. Under the allegations notice is given that the plaintiff intends to show slander committed outside the court. Regardless of what the plaintiff may ultimately prove, he has alleged that in committing the slander the employees were acting within the scope of their employment. Therefore, the motion to dismiss should not have been granted as to the fourth statement of claim in so far as the country club and the defendant Robinson were concerned.

VIII
The fourth statement of claim contained the following allegations with respect to the defendants Juhan and Aucoin, the district attorney and deputy district attorney, respectively:
"5. That on or about the 30th day of September, A.D., 1965, Defendant, *443 EDWARD N. JUHAN, committed libel and slander against the Plaintiff, JOHN E. McDONALD, by stating, and causing to be published, an accusation, which he well knew to be without any foundation whatsoever against Plaintiff, JOHN E. McDONALD, to the effect that Plaintiff, JOHN E. McDONALD, had committed the crime of Grand Larceny against a member of THE LAKEWOOD COUNTRY CLUB, while on the premises of said Club.
"6. That on or about the 30th day of September, A.D., 1965, and at various times thereafter, Defendant, GEORGE AUCOIN, committed slander against the Plaintiff, JOHN E. McDONALD, by accusing him without any foundation or right, and falsely, as he well knew, of having committed the crime of Grand Larceny by stealing certain monies and property from the premises of THE LAKEWOOD COUNTRY CLUB; and said Defendant, GEORGE AUCOIN, did repeat and perpetuate the slander on and after the 11th day of January, A.D., 1966, in prosecuting maliciously and without any foundation or right a criminal action against Plaintiff, JOHN E. McDONALD, holding him to answer to the above stated crime; and Defendant, GEORGE AUCOIN, further perpetuated the slander and further libeled the Plaintiff, by stating to newspaper reporters, when he well knew that the same would be printed, that Plaintiff, JOHN E. McDONALD, had not explained his presence on the premises of THE LAKEWOOD COUNTRY CLUB, and this implying that Plaintiff, JOHN E. McDONALD, had committed the crime of Grand Larceny."
Earlier in the complaint it was alleged that the district attorney on or about September 30, 1965 signed and caused to be filed the information which charged the plaintiff with grand larceny. It seems to us that by paragraph 5 just quoted the plaintiff is alleging that the district attorney committed libel and slander by signing and filing the information. Therefore, as we have already held in this opinion, the act was privileged.
As to the allegations contained in paragraph numbered 6, the trial court ruled that the deputy district attorney was not liable for acts performed in his official capacity, but he did not dismiss the complaint as to the defendant Aucoin with respect to acts committed in his individual capacity. We take this to mean acts committed outside of his official duties. We approve the ruling of the trial court in dismissing as to acts performed as a part of official duties. The remainder of the trial court's ruling as to Aucoin is not before us.

IX
The fifth statement of claim was by the plaintiff wife for intentional infliction of "mental disturbance and anguish," being the result of the acts of all of the defendants in error, except the Maryland Casualty Company. As the trial court entered a judgment in favor of all defendants except Aucoin individually, the effect was that the fifth statement of claim was dismissed as to all other defendants in error. This would seem to be consistent with the court's other rulings because, if there was no liability to plaintiff, there would be no basis of liability in favor of the plaintiff wife. For the reasons already expressed, the dismissal as to Juhan and the dismissal as to Aucoin in his official capacity as deputy district attorney was correct.
We do not attempt to pass on the sufficiency of the fifth statement of claim as applied to the defendants other than Juhan and Aucoin. Under the disposition made by the trial court, it did notand did not need toconsider the sufficiency of the claim of the plaintiff wife beyond its rulings made with respect to the plaintiff. Under our holding, it must now do so for the first time.

X
The sixth statement of the claim incorporated all of the allegations of the first two *444 statements of claim, and attempted to charge the district attorney and his deputy with the violation of a duty to act with reasonable care in determining whether to prosecute the plaintiff, and with negligently and unwarrantedly confining and prosecuting the plaintiff. We have not before heard of this particular tort, and the plaintiff cites no authority with respect to it. The matter of the motion to dismiss directed to this statement of claim is resolved by our ruling with respect to the district attorney and deputy district attorney in connection with the second statement of claim. The allegations in the sixth statement embrace only official acts of these two defendants and they are privileged.
When one pleads ultimate facts which, if supported by adequate proof, would justify a recovery, then he is entitled to his day in court to attempt to prove his allegations. This is unaffected by the trial court's divination of future testimony.
Judgment affirmed in part and reversed in part, and the cause remanded for further proceedings consonant with the views expressed herein.
