
176 N.W.2d 62 (1970)
STATE of South Dakota, Plaintiff-Respondent,
v.
Richard REGGIO, Defendant-Appellant.
No. 10732.
Supreme Court of South Dakota.
April 7, 1970.
*63 Richard D. Hagerty, Yankton, for defendant-appellant.
Gordon Mydland, Atty. Gen., Leonard E. Andera, Asst. Atty. Gen., Pierre, for plaintiff-respondent.
RENTTO, Judge.
The question presented on this appeal is whether an information must be dismissed because evidence obtained by an illegal search and seizure was introduced at the preliminary examination which was the basis for holding the defendant to answer the charge therein alleged.
When a quantity of cigarettes stolen from a retail store in Yankton, South Dakota, were discovered and seized in a search of the room which defendant shared with another, he was arrested and charged with the crime of grand larceny. He demanded a preliminary hearing which was held before the judge of the municipal court of that city acting as a committing magistrate. At such hearing the defendant was represented by retained counsel and the prosecution by the states attorney. Several witnesses testified for the state and were subjected to cross-examination on behalf of the defendant. Among them was a young lady who had worked with the defendant in the store from which the cigarettes were said to have been stolen, and its manager. Defendant offered no evidence.
One of the witnesses was a police officer who was present when the defendant's room was being searched. He objected to any testimony by the officer concerning the finding of the cigarettes on the ground that the search of his room during which they were discovered was unlawful. This was overruled. At the conclusion of the examination the magistrate held him to answer to the offense with which he was charged.
When arraigned in circuit court on the information charging him with the larceny of these cigarettes he entered a plea of not guilty, and moved that the evidence secured in the search of his room be suppressed on the ground that it was obtained by an unlawful search. After a hearing had thereon the motion to suppress was sustained. For the purpose of our review we pass the state's claim that the search was lawful and accept the trial court's determination.
About a week later, admittedly to avoid the waiver of his motion prescribed by SDCL 23-36-2, defendant asked for and *64 was granted permission to withdraw his plea of not guilty. This was agreeable to the state. Defendant then made a motion to set aside the information because his commitment to answer thereto was based on illegally obtained evidence. This was denied.
At this stage his previously withdrawn plea of not guilty of the charge contained in the information was reinstated. On trial of the issues thus raised, the jury returned its verdict finding him guilty of grand larceny. The judgment entered thereon, from which he appeals, sentenced him to imprisonment in the reformatory section of our penitentiary. His sole claim here is that the described preliminary examination was constitutionally defective.
The right to a preliminary examination was unknown to the common law. It is not of constitutional origin, but is rather a creature of statute. SDCL 23-27-1. As such the legislature could have dispensed with it had it been so inclined. State v. Anderson, 60 S.D. 187, 244 N.W. 119. It is intended and designed to inquire concerning the commission of a crime and the defendant's involvement in it. Accordingly, there is no necessity for the entry of a plea, and no requirement that one be entered.
One of its principal purposes is to insure an accused that he will not be called upon to stand trial until a magistrate has determined after such examination that a public offense has been committed and that there is sufficient cause to believe the defendant guilty thereof. SDCL 23-27-16. Our statutes do not prevent a subsequent prosecution for the same offense if he is discharged as a result of the examination. It is in no sense a trial of the person accused.
The grounds for setting aside an information are enumerated in SDCL 23-36-1. We have held in effect that these are exclusive. State v. Carlisle, 30 S.D. 475, 139 N.W. 127. The admission of illegally obtained evidence on the preliminary examination is not made a ground for setting aside the information. The last paragraph of the cited section provides that the information must be set aside by the court in which the defendant is arraigned, and upon his motion:
"When the defendant has not had a preliminary examination before the information is filed, as provided by §§ 23-20-2 and 23-20-3."
Emphasis is given to this provision by SDCL 23-20-2 which forbids the filing of an information against a person for an offense until he has had a preliminary examination or has waived it. SDCL 23-20-3 permits the filing of an information against a fugitive from justice without an examination.
From our statutes it is logical to conclude that if the magistrate binds an accused to answer without any proof having been submitted he has not been afforded a preliminary examination. That the defendant was afforded a hearing and that evidence was submitted is not denied. The thrust of his argument seems to be that the validity thereof was destroyed by the admission of evidence that was illegally obtained. We do not agree.
If the illegally obtained evidence were the sole basis for the magistrate's action there would be merit in his position. Badillo v. Superior Court, 46 Cal.2d 269, 294 P.2d 23; People v. Valenti, 49 Cal.2d 199, 316 P.2d 633; People v. Scoma, Cal., 78 Cal.Rptr. 491, 455 P.2d 419. The corollary to this is that the rule is otherwise when the tainted evidence is not the sole basis for the magistrate's action. It is our view that the admission of such evidence does not render the information subject to dismissal if there was sufficient other evidence to establish the commission of the offense and the defendant's participation in it.
Apparently the defendant had told one of his co-workers at the store about the theft in issue. At the preliminary examination *65 she testified concerning the admissions he made to her. They are undisputed. From our study of the transcript of the testimony submitted at the examination we are satisfied that the evidence introduced at the hearing, exclusive of that illegally obtained, is clearly sufficient to support his decision. Accordingly, we hold that the denial of defendant's motion to dismiss the information was proper.
Affirmed.
All the Judges concur.
