
424 N.W.2d 576 (1988)
In re the Matter of the Investigation of the DEATH OF Dirk VanSLOOTEN.
No. CO-88-1067.
Court of Appeals of Minnesota.
June 14, 1988.
Review Denied July 28, 1988.
*577 Hubert H. Humphrey, III, Atty. Gen., St. Paul, Thomas L. Johnson, Hennepin County Atty., Michael Richardson, Asst. Co. Atty., for State of Minnesota, petitioner.
William J. Mauzy, Kevin J. Short, Minneapolis, for respondent.
Considered at Special Term and decided by WOZNIAK, C.J., and PARKER and FORSBERG, JJ., without oral argument.

SPECIAL TERM OPINION
WOZNIAK, Chief Judge.

FACTS
Respondent is a suspect in the death of Dirk VanSlooten on February 18, 1988. On February 19, respondent, a business partner of VanSlooten, retained Mauzy and *578 Short to represent him. On that day, attorney Short instructed him to write out his thoughts on his defense and label them as attorney-client privileged. Respondent did so, and also dictated some material onto tapes and computer diskettes. Some of the material was delivered to Short, the remainder was seized by police. Respondent objected to this seizure, and on February 24 his attorney obtained an ex parte order for the sealing and delivery of this material to the court. Following a motion and argument by both parties, the court ordered return of the material to respondent. The trial court, in a lengthy memorandum, rejected petitioner's claims (1) that it lacked jurisdiction to order the return of the materials, (2) that such an order would violate the doctrine of separation of powers, and (3) that the attorney-client privilege does not extend to the materials seized.

DECISION
In O'Connor v. Johnson, 287 N.W.2d 400 (Minn.1979), the supreme court granted a writ of prohibition to prevent the municipal court from requiring an attorney to turn over his work product file for in camera inspection. In O'Connor, as here, no criminal charges had been filed; as petitioner notes, however, the supreme court did not directly address the jurisdictional or separation-of-powers issues.

a. Jurisdiction
Minn.Stat. § 626.21 (1986) provides:
A person aggrieved by an unlawful search and seizure may move the district court for the district in which the property was seized * * * for the return of the property and to suppress the use, as evidence, of anything so obtained.
Petitioner concedes such a motion may be heard before criminal charges are filed but contends this statute was not cited to the trial court.
Minn.Stat. §§ 626.15-.17 (1986) require police officers executing a warrant to make a return and inventory of property seized to the court which issued the warrant. These statutes plainly give the issuing court inherent authority over the execution of a search warrant, regardless of the timing of a criminal complaint or indictment. We conclude the court had jurisdiction under chapter 626 to order the return of the materials seized. Moreover, we see no merit in petitioner's argument that Minn. Stat. § 626.21 is limited to the return of materials seized in violation of the Fourth Amendment. The statute contains no such limitation. The supreme court has specifically protected material immune from seizure under the attorney-client privilege with the rationale that:
Once that information is revealed to the police, the privileges are lost, and the information cannot be erased from the minds of the police.
O'Connor, 287 N.W.2d at 405.

b. Separation-of-powers doctrine
Petitioner argues the court's order, by intruding into a homicide investigation under the direction of an executive officer, violates the doctrine of separation of powers. Minn. Const. Art. 3 § 1. Petitioner cites a case limiting judicial intrusion into the prosecutor's function in charging and prosecuting the case. State v. Carriere, 290 N.W.2d 618, 620-21 (Minn.1980) (trial court does not have unlimited discretion to accept pleas to a lesser offense over the prosecutor's opposition); see also State v. Olson, 325 N.W.2d 13 (Minn.1982) (prosecutorial approval cannot be a prerequisite to judicial decision not to sentence under mandatory minimum sentencing law).
As the trial court noted, the courts do have authority over executive officials in the exercise of purely ministerial functions. State ex rel. Kinsella v. Eberhart, 116 Minn. 313, 318, 133 N.W. 857, 858 (1911). Although petitioner characterizes the court's order as affecting the prosecutor's function, it directly affects only the police officers' execution of the search warrant. Police officers carrying out a search warrant, however, are subject to the direction of the court, Minn.Stat. § 626.13-.17, and their role is surely "ministerial," i.e., not allowing great exercise of discretion.
The prosecutor's decision whether to bring, and how to prosecute, criminal *579 charges, is protected by the separation of powers doctrine. See Carriere, 290 N.W. 2d at 620 n. 3. In the analogous area of absolute immunity from suit, even a prosecutor's investigation may be entitled to absolute immunity if it is necessary to the prosecutor's decision to charge. See Forsyth v. Kleindienst, 599 F.2d 1203, 1215 (3d Cir.1979) (investigative activity is in a "gray area" between absolute prosecutorial immunity and qualified "good faith" immunity). As the Eighth Circuit has noted:
some investigative case preparation can be regarded as an integral component of case presentation.
Myers v. Morris, 810 F.2d 1437, 1450 (8th Cir.1987).
In Myers, the Eighth Circuit held the prosecutor's role in questioning child sexual abuse victims about the involvement of other potential defendants was protected by absolute immunity. Id. at 1451. The prosecutor, however, was personally involved in the questioning. Moreover, criminal charges had already been filed against one individual. Id. at 1450.
Police officers here were merely executing a search warrant. Although personnel from the county attorney's office may have prepared the application for the search warrant, that function is not at issue. The execution of a search warrant is not an essential prosecutorial function; rather, it is subject to the direction of the court. There is not even an allegation here that the county attorney was consulted before the allegedly privileged materials were seized. Cf. Forsyth, 599 F.2d at 1215 (attorney general's decision to authorize warrantless electronic surveillance enjoyed absolute immunity). The fact that return of the material seized may ultimately affect whether a prosecution is successful, or even whether it is brought, does not indicate the court has violated the separation of powers doctrine by intruding on the charging decision.

c. Attorney-client privilege
Petitioner contends the privilege does not apply to the materials seized because they are not testimonial and were not in the possession of the attorney. The attorney-client privilege, however, applies to documents, even when their production in court is not threatened. As the supreme court stated in O'Connor:
The indispensable relationship of trust between client and attorney and the adequate functioning of our adversary system of justice can only be ensured when the client can completely disclose all the facts  favorable and unfavorable  without the fear that the attorney's files will be seized by police officers pursuant to a search warrant.
Id., 287 N.W.2d at 403.
A privilege may apply to the disclosure of privileged information before a prosecution is begun. See State v. Odenbrett, 349 N.W.2d 265, 268 (Minn.1984) (disclosure by mental health center staff authorized by Child Abuse Reporting Act). The attorney-client privilege applies to compelled disclosure by the client as well as the attorney. Brown v. St. Paul City Ry. Co., 241 Minn. 15, 34, 62 N.W.2d 688, 700 (1954). Even though the documents and tapes had not been delivered to the attorney, they had been prepared at his request, labeled at his direction, and were merely awaiting delivery. This is not the case of an "attorney-client privilege" label being slapped on evidence of wrongdoing which was not generated because of the relationship.
The documents claimed on their face to be privileged, and the trial court appears to have confirmed that status by in camera examination. On this record, we cannot say the trial court exceeded its authority in finding they were confidential communications to an attorney for the purpose of obtaining legal advice. See State v. Lender, 266 Minn. 561, 124 N.W.2d 355 (1963). We note also the O'Connor decision is based not only on the attorney-client privilege, but also on the principle of client confidentiality, attorney work product doctrine, and the criminal defendant's constitutional right to counsel. O'Connor, 287 N.W.2d at 403-405.
Petition for writ of prohibition denied.
