
690 P.2d 419 (1984)
STATE, ex rel., Calvin W. PERMAN, Sr. Guardian ad litem of Alana Gayl Perman, Petitioner and Appellant,
v.
DISTRICT COURT OF the THIRTEENTH JUDICIAL DISTRICT, IN AND FOR the COUNTY OF YELLOWSTONE, Respondent and Respondent.
No. 83-191.
Supreme Court of Montana.
Submitted March 5, 1984.
Decided October 31, 1984.
*420 Overfelt Law Firm, Lee Overfelt argued, Billings, for petitioner and appellant.
Calton & Hamman, Frances Calton argued, Billings, for respondent and respondent.
WEBER, Justice.
This is an appeal of an order dismissing a complaint and imposing conditions upon the plaintiff's right to refile. We vacate the order of the District Court and remand the cause for a competency hearing to determine whether appointment of a guardian ad litem is necessary and whether the notice of dismissal was filed with plaintiff's consent.
The following issues are dispositive:
1. After removing Calvin Perman as guardian ad litem, did the District Court lack jurisdiction to dismiss the complaint?
2. Did the court err in dismissing plaintiff's complaint by order of the Court, under Rule 41(a)(2), M.R.Civ.P., after Calvin Perman, the former guardian ad litem, filed a notice of dismissal under Rule 41(a)(1), M.R.Civ.P.?
Alana Gayl Perman is the adult daughter of Laila Georgean Johnson and the wife of Calvin W. Perman, Sr. On March 19, 1982, Alana Gayl Perman (Gayl), Laila Georgean Johnson (Gayl's mother) and Robert Jeffrey Prochnick (Gayl's brother) executed a trust agreement. Gayl granted to the trust all of her interest in the Estate of Alice D. Fernbaugh, Gayl's deceased grandmother.
The trust agreement named Gayl's mother and brother as co-trustees, with absolute discretion to distribute income and principal *421 "to or for the use and benefit of Alana Gayl Perman." The specified term of the trust is Gayl's lifetime, plus ten years. The agreement provides that, unless Gayl designates by will or otherwise who is to receive trust assets after her death, the remaining assets shall be divided equally between Gayl's mother and two brothers or their heirs. The trust agreement makes no mention of Gayl's husband, Calvin W. Perman, Sr.
On June 21, 1982, Calvin W. Perman, Sr. (Calvin) commenced an action by filing a complaint alleging that the co-trustees had deceived and coerced Gayl into signing the trust agreement. The complaint alleged that Gayl believed she was signing a document to receive an inheritance from her grandmother's estate. The complaint also alleged:
"That at all times herein mentioned Alana Gayl Perman was, and is, a developmentally disabled person, unable to read or write or comprehend or understand the contents of any legal document or the purpose for which it was prepared."
The complainant asked the court to declare the trust agreement null and void and to order an accounting by the trustees. The complaint was signed by "Calvin W. Perman, Sr., Guardian Ad Litem of Alana Gayl Perman."
In his petition for appointment of guardian ad litem, dated June 25, 1982, Calvin again alleged that Gayl was developmentally disabled and incapable of conducting her own affairs. Based on Calvin's allegations that appointment of a guardian ad litem was required, the District Court ordered the appointment of Calvin Perman as Gayl Perman's guardian ad litem on June 25, 1982.
On September 7, 1982, defendants filed a motion for dismissal of the complaint for failure to state a claim upon which relief can be granted. No ruling was made on this motion, and no answer or cross-complaint was filed by defendants.
Defendants alleged facts to the District Court indicating that a serious conflict of interest existed between Calvin and Gayl, and that as a result Calvin should be removed as guardian ad litem. On October 8, 1982, the District Court entered an order vacating Calvin's appointment as guardian ad litem pending a competency hearing to determine whether Gayl is competent to pursue this action on her own behalf. The District Court also ordered that defendants' motion to dismiss be deferred pending the competency hearing. Calvin subsequently petitioned this Court for a writ of supervisory control, which was denied.
The District Court ordered a competency hearing to be held before the court on March 17, 1983. Counsel for both parties entered into a written stipulation that Gayl would be examined by psychiatrist Tom Lewis, M.D., on February 17, 1983. The stipulation specified: "Costs of such examination shall be borne by Defendant Trustees herein. Such costs may be included as an item of costs in this action." Plaintiff's counsel later objected to the manner in which Dr. Lewis was to be paid and the examination did not take place.
Defendants moved the District Court to enforce the stipulation or, in the alternative, to order a mental examination of Gayl. The show cause hearing on that motion was scheduled for February 24, 1983. On the day before the hearing, plaintiff's counsel filed a notice "withdrawing" the stipulation and a motion for immediate appointment of Calvin as guardian ad litem. He also moved the court for an order vacating the competency hearing scheduled for March 17, 1983.
The hearing on defendants' motion to enforce compliance with the stipulation was postponed until March 3, 1983. On March 2, the day before the show cause hearing, Calvin's counsel filed a notice of dismissal of the complaint without prejudice under Rule 41(a)(1), M.R.Civ.P.
Thereafter, the District Court entered an order dismissing the cause under Rule 41(a)(2), M.R.Civ.P., subject to the following conditions:
"(1) Pursuant to Rule 41(d) M.R.Civ.P., plaintiff will be required to pay all of the *422 costs of this action in the event that plaintiff refiles a similar action against defendants.
"(2) The Stipulation entered into by the parties hereto, dated February 15, 1983, must be adhered to in the event that a new or similar action is filed by plaintiff against defendants.
"(3) If this action or any action similar to this one is refiled by plaintiff in another cause, this proceeding must be reinstated." Order, March 16, 1983.
The plaintiff appeals from this order.

I
After removing Calvin Perman as guardian ad litem, did the District Court lack jurisdiction to dismiss the complaint?
Appellant argues that rescission of Calvin Perman's appointment as guardian ad litem of Gayl Perman divested the court of jurisdiction over the complaint filed on her behalf. We disagree.
A civil action is commenced by the filing of a complaint with the court. Rule 3, M.R.Civ.P. "[T]he only effect of a party's incompetence upon maintenance of the action is the possible need for appointment of a guardian ad litem or entry of a protective order." Donnelly v. Parker (D.C. Cir.1973), 486 F.2d 402, 407. "Appointment of a guardian ad litem is not a jurisdictional requirement." Shelley v. Elfstrom (1975), 13 Wash. App. 887, 538 P.2d 149, 150.
The District Court has an affirmative duty to assure that the rights of a party, who is alleged to be incompetent, are protected. Rule 17(c), M.R.Civ.P. provides in pertinent part:
"... The court shall appoint a guardian ad litem for an ... incompetent person not otherwise represented in an action or shall make such other order as it deems proper for the protection of the .. . incompetent person, or in any case where the court deems it expedient a guardian ad litem may be appointed to represent an ... incompetent person, even though the ... incompetent person may have a general guardian and may have appeared by him."
Section 25-5-301(3), MCA, the statute under which Calvin Perman's initial petition for appointment was granted, states:
"When a guardian ad litem is appointed by the court, he must be appointed as follows:
.....
"(3) when an ... incompetent person is party to an action or proceeding, upon the application of a relative or friend of such ... incompetent person or of any other party to the action or proceeding."
Both section 25-5-301(3), MCA and Rule 17(c), M.R.Civ.P. require appointment of a guardian ad litem for an incompetent person whose rights might be abrogated by a lack of proper representation. Neither provides that appointment of a guardian ad litem makes the guardian ad litem a party to the lawsuit.
The court's jurisdiction is neither enhanced nor diminished by the appointment of a guardian ad litem. The guardian ad litem appears in a representative capacity only. He does not become a party to the action any more than the incompetent person's attorney of record is a party. Sarracino v. Superior Court of Los Angeles County (1974), 13 Cal.3d 1, 118 Cal. Rptr. 21, 529 P.2d 53, 61. Removal of a guardian ad litem does not divest the court of jurisdiction over the action or the incompetent party.
We hold that the District Court retained jurisdiction over the action after removal of the guardian ad litem.

II
Did the District Court err in dismissing plaintiff's complaint by order of the court after the former guardian ad litem filed a notice of dismissal?
On October 8, 1982, the District Court entered its order vacating the appointment of Calvin as guardian ad litem of Gayl. That order effectively removed him from the office of guardian ad litem, after which Calvin lacked authority to act on Gayl's behalf. Notwithstanding that removal, *423 Calvin filed a notice of dismissal without prejudice on March 2, 1983, which stated:
"COMES NOW the Plaintiff, Calvin Perman, and through his attorney, Lee Overfeldt, dismisses the above-entitled matter without prejudice. This dismissal is filed pursuant to Rule 41, Subsection 1, of the Montana Rules of Civil Procedure... ."
Rule 41(a)(1), M.R.Civ.P. provides that "an action may be dismissed by the plaintiff without order of court ... by filing a notice of dismissal at any time before service by the adverse party of ... a motion for summary judgment ..." (emphasis added). The District Court reasoned that defendants' September 7, 1982 motion to dismiss should be treated as a motion for summary judgment because the court considered matters outside the pleadings, which had been presented to the court under Rule 12(b)(6), M.R.Civ.P.
After extensive memoranda and arguments, the District Court treated Calvin's notice of dismissal as the equivalent of a motion for voluntary dismissal under Rule 41(a)(2), M.R.Civ.P. The District Court then granted the motion to dismiss subject to the above-stated conditions.
We hold that Calvin's notice of dismissal was completely ineffective. Calvin had been removed as guardian ad litem. He was not an individual party to the action, nor acting in a representative capacity as guardian ad litem. His notice of dismissal was totally inappropriate and ineffective. The action was not "dismissed by the plaintiff," as provided in Rule 41(a)(1), M.R.Civ.P. Nor was there any action at "the plaintiff's instance," as set forth in Rule 41(a)(2), M.R.Civ.P.
The District Court was sufficiently impressed by defendant's allegations of conflict of interest between Gayl and Calvin that the court vacated Calvin's appointment and scheduled a competency hearing to determine whether Gayl could proceed on her own behalf or whether appointment of a new guardian ad litem was required. Plaintiff's counsel signed interrogatories stating that he had been retained as counsel for both Calvin and Gayl. In view of the serious allegations of conflict of interest, it is not appropriate that plaintiff's counsel continue representing both Calvin and Gayl in this proceeding. We also note that the proposed dismissal of the action took place approximately 11 months after the complaint was filed and after extensive pretrial discovery, many motions and an application to this Court for supervisory control. The issue of Gayl's incompetence has yet to be adjudicated.
Once the issue of incompetency is raised, it is the duty of the court to determine whether the party is competent and to appoint a guardian ad litem if the party is incompetent. Rule 17(c), M.R.Civ.P. Absent that determination, an adjudication affecting the rights of the alleged incompetent cannot stand. See In re the Marriage of Tesch (Mont. 1982), 648 P.2d 293, 297, 39 St.Rep. 1318, 1322. Here conflicting allegations were made by Gayl's husband, her mother and brother. Under this circumstance, it is essential that the District Court protect the interests of the unrepresented, alleged incompetent. That protection includes the appointment of a guardian ad litem, if necessary.
Nowhere on the record are Gayl's wishes regarding the trust agreement expressed. The psychiatrist stipulated to by the parties has not had the opportunity to examine Gayl. No competency hearing has been conducted, and the court has not yet determined whether Gayl is competent or incompetent. It was the duty of the court to determine either that Gayl was competent or that a guardian ad litem was required. Nothing was gained by the dismissal and much may have been lost if Gayl is, in fact, incompetent. See Shelley, 538 P.2d at 151.
We vacate the order of dismissal and return the matter for further proceedings with the following instructions:
1. The District Court shall hold a competency hearing to determine whether Gayl is competent to represent herself in this matter and thereafter appoint a guardian ad litem should that be found necessary.
*424 2. In the event that the District Court concludes that immediate representation is required for Gayl in connection with the competency hearing, the District Court shall appoint a guardian ad litem to act for the period of time prior to the entry of its order determining competency.
HASWELL, C.J., and SHEA, MORRISON, GULBRANDSON and HARRISON, JJ., concur.
SHEEHY, Justice, concurring and dissenting in part:
I concur that the action of the District Court concerning the trust agreement executed by Alana Gayl Perman should not have been dismissed. Rather, the District Court should keep jurisdiction of the cause for the purpose of determining the correct disposition of the assets of the trust estate.
The assumption of the majority opinion that there is a conflict of interest so that plaintiff's counsel may not represent Calvin and Gayl in the proceeding is unwarranted. There has not been a single line of testimony taken in the case below. Although interrogatories have been submitted from both sides, demands for admissions, and other efforts of attorneys in discovery proceedings, none of them have been answered, no depositions have been taken, nor any affidavit filed either from Calvin and Gayl, nor from the mother, Laila Georgean Johnson nor the brother Robert Jeffrey Procknick. All that the voluminous District Court file contains are allegations and counterallegations of attorneys. There is no reason for the majority to assume at this stage that an attorney could not properly represent both the husband and wife in these proceedings.
From the pleadings, from statements in briefs of counsel, and from the form of interrogatories and demands for admissions submitted, we may glean the following possibilities (I emphasize that there is no testimony or affidavits filed): Gayl has a basic I.Q. of 61, and a competency level of second grade. She signed a trust agreement without the knowledge of her husband of then eight years, in his absence, an instrument that gives to her mother and brother as trustees absolute discretion as to the expenditure of Gayl's funds, and makes them sole heirs of her trust estate in the event of her death. Calvin and Gayl may be alcoholics, and Calvin may be guilty of wife abuse. The mother, one of the trustees, may have been in and out of mental institutions. The brother resides in Sheridan, Wyoming, and not in Billings, Montana, where Gayl and Calvin live. The trustees may be using the funds of the trust estate for the purpose of defending the litigation involving the trust agreement, paying costs and attorney fees from Gayl's estate.
Although this case was filed June 21, 1982, now, 2 1/2 years later, the basic action has not gotten beyond the original motion to dismiss. We have no record of any kind to indicate what is occurring with respect to the assets in the trust estate.
In light of that situation, I would go further than the majority in not dismissing the case in the District Court. I would remand the cause with directions to the District Court immediately to appoint a guardian ad litem and for the entry of an order requiring the trustees to file an accounting of the trust estate within 30 days of remand. If after a competency hearing, the District Court decided that the husband should not act as guardian ad litem because of a possible conflict of interest, I would still allow his participation in the action as husband and next friend for the purpose of assuring an adversarial determination of the basic issue, whether the trust instrument is legally proper in the first place.
