*1166OPINION
By the Court,
Springer, J.:This original petition for a writ of prohibition involves several rulings of the district court in case Nos. A275604 and A312496.1 Specifically, petitioner, Harvey L. Lerer, Inc. (“Lerer”), asserts that the Eighth Judicial District Court lacks jurisdiction over case Nos. A275604 and A312496. Lerer seeks a writ of prohibition from this court, ordering the district court to refrain from taking further steps to hear, determine or adjudicate any issues in these cases. Lerer also requests that this court order the district court to vacate certain of its orders, namely, an order holding Lerer in contempt and an order setting a hearing date for a Motion to Adjudicate Attorney’s Lien. Lerer requests that this court order dismissal of the two cases. We grant Lerer’s petition and order *1167the district court to dismiss the above-mentioned cases and vacate its orders holding Lerer in contempt of court.2
In August 1989, Teresita and Edward Callotta (“the Callottas”) hired Los Angeles attorney Lerer to represent them in a personal injury claim arising from an automobile accident (case No. A275604, “the Callotta case”). The Callottas and Lerer had a written retainer agreement calling for a contingency fee to be paid to Lerer of forty percent of all sums recovered. Since Lerer was not admitted to practice in Nevada, he entered into an oral agreement with the real party in interest, Donald S. Smith, Chartered (“Smith”), a Nevada-licensed attorney, to be local counsel.
In late 1991 or early 1992, an initial partial settlement of $50,000.00 was obtained from an insurance carrier in the Callotta case. In July 1992, Lerer and the other insurers in the Callotta case agreed to an additional settlement of $325,000.00. Smith claims that Lerer still owes him fees in connection with these settlements.
On September 4, 1992, Smith filed and served upon all counsel and the district court a motion to adjudicate an attorney’s lien, pursuant to NRS 18.015. In his affidavit in support of his motion, Smith requested that the district court award him a “reasonable attorney’s fee in the gross sum of [$75,000.00], to be enforced against the settlement proceeds.” (Emphasis added.) Smith admitted that there was no agreement between himself and the Callottas and asserted that his claim for attorney’s fees was based in quantum meruit. Lerer and his attorney, Edward Coleman, on behalf of the Callottas, opposed Smith’s motion to adjudicate the attorney’s lien. In his opposition, Lerer claimed that since Smith was never retained by the Callottas and worked only for Lerer, NRS 18.015 was inapplicable.
On October 14, 1992, Lerer filed a complaint alleging that Smith breached his agreement with Lerer (case No. A312496, “the Lerer case”). Smith responded with a motion to dismiss. In his complaint, Lerer set forth arguments regarding attorney’s fees similar to those set forth in his opposition to Smith’s motion to adjudicate the attorney’s lien. On that same day, the district court conducted a second hearing on Smith’s motion to adjudicate the attorney’s lien. At that hearing, the district court continued Smith’s motion to adjudicate attorney’s lien and consolidated the Callotta and Lerer cases. The district court also ordered attorney’s fees transferred from Lerer’s trust account in California to a *1168blocked account in Nevada. Lerer did not comply with the court’s order and instead sent a highly disrespectful letter to the district court. The district court held Lerer in contempt for his letter but reserved judgment on an appropriate sanction. Lerer filed a voluntary dismissal of the Lerer case with the district court clerk, but at a later hearing, the district court vacated Lerer’s voluntary dismissal of the Lerer case, stating that the case had already been consolidated with the Callotta case.
On March 26, 1993, the district court entered an order which held Lerer in contempt of court for failing to appear at a February 24, 1993 contempt hearing and for failing to comply with the district court’s order establishing the blocked account. The district court also set the hearing date for Smith’s motion to adjudicate the attorney’s lien, and denied Smith’s motion to dismiss the Lerer case.
A writ of prohibition may issue to arrest the proceedings of a district court exercising its judicial functions, when such proceedings are in excess of the jurisdiction of the district court. NRS 34.320. A writ of mandamus is available to compel the performance of an act which the law requires as a duty resulting from an office, trust or station. NRS 34.160. Petitions for extraordinary writs are addressed to the sound discretion of the court and may only issue where there is no “plain, speedy, and adequate remedy” at law, NRS 34.330; State ex rel. Dep’t Transp. v. Thompson, 99 Nev. 358, 662 P.2d 1138 (1983); however, “each case must be individually examined, and where circumstances reveal urgency or strong necessity, extraordinary relief may be granted,” Jeep Corp. v. District Court, 98 Nev. 440, 443, 652 P.2d 1183, 1185 (1982) (citing Shelton v. District Court, 64 Nev. 487, 185 P.2d 320 (1947)).
We conclude that the district court should not have entertained Smith’s claim of attorney’s fees because NRS 18.015 is inapplicable to purely inter-attorney disputes, such as this one, which are not predicated on an attorney/client fee agreement. The statute states in pertinent part:
1. An attorney at law shall have a lien upon any claim, demand or cause of action, including any claim for unliqui-dated damages, which has been placed in his [or her] hands by a client for suit or collection, or upon which a suit or other action has been instituted. The lien is for the amount of any fee which has been agreed upon by the attorney and client. In the absence of an agreement, the lien is for a reasonable fee for the services which the attorney has ren*1169dered for the client on account of the suit, claim, demand or action.
The statute contemplates a voluntary and independent agreement between the attorney and the client that one will act on the other’s behalf; the “claim, demand or cause of action” must be “placed in [the attorney’s] hands by a client.” Id. Other courts considering similar statutes have reached the same conclusion. See, e.g., Hahn v. Oregon Physicians’ Service, 786 F.2d 1353, 1355 (9th Cir. 1985) (“We conclude that, because no independent contract between [the lawyer] and the doctors ever existed, [the lawyer] does not have a right to a lien against the doctors’ recovery.”); accord Democratic Cent. Comm. v. Metro. Area Transit Comm’n, 941 F.2d 1217, 1219 (D.C. Cir. 1991); see generally Hebert v. Ternoir, 340 So. 2d 1020 (La. Ct. App. 1976). The rationale of these cases is that a lawyer cannot be allowed to hold unilaterally a “client” liable for fees when that lawyer is acting merely as the agent of another attorney. If, on the other hand, the client purposely places a claim or action in the lawyer’s hands, then an independent agreement may exist between the client and the lawyer, and the lawyer may then use the attorney’s lien statute to recover the agreed-upon fee for her or his services, or at least the reasonable value thereof. No such delay occurred in the instant case because of the efforts of the district court in ensuring that the Callottas received their share of the settlement; however, this does not change the fact that the district court should have refused to entertain a suit under NRS 18.015 on these facts.
Smith admits that he had no independent agreement with the Callottas yet he still sought to hold their recovery hostage in his fee dispute with Lerer. The only agreement for payment between attorney and client here was between the Callottas and Lerer, as Smith freely admits. Smith’s representation arose only as a result of a contract between Lerer and Smith; therefore, Smith must look to Lerer for his recovery; he may not “bootstrap” a breach of contract action against another attorney into an attorney’s lien under NRS 18.015. We conclude, then, that the district court was obligated as a matter of law to refuse to entertain Smith’s motion under NRS 18.015.3
*1170Lerer contends that since he filed a voluntary dismissal of the Lerer case with the district court clerk pursuant to NRCP 41,4 and since Smith also attempted to dismiss the Lerer case, the district court no longer has jurisdiction over that case. We agree. The district court was not at liberty to ignore Lerer’s voluntary dismissal and to retain jurisdiction over the case on its own initiative. As this court has previously noted:
Federal Sav. & Loan Ins. Corp. v. Moss, 88 Nev. 256, 259, 495 P.2d 616, 618 (1972) (emphasis added) (quoting American Cyanamid Co. v. McGhee, 317 F.2d 295, 297 (5th Cir. 1963)); accord Jeep, 98 Nev. at 443-44, 652 P.2d at 1186. We conclude that the district court was without authority to vacate Lerer’s voluntary dismissal and, therefore, acted in excess of its jurisdiction.
Because the district court improperly entertained Smith’s motion to adjudicate an attorney’s lien in case No. A275604, the clerk of this court shall issue a writ of mandamus ordering the district court to dismiss the case and vacate the orders issued in connection therewith. Furthermore, because the district court lacked jurisdiction over case No. A312496, the clerk of this court shall issue a writ of prohibition directing the district court to refrain from hearing or adjudicating any issues in that case.
Steffen, C. J., and Young, J., concur.“Although petitioner has requested only a writ of prohibition, we elect to treat this petition as seeking relief in both prohibition and mandamus.” See Attorney General v. District Court, 108 Nev. 1073, 1074, 844 P.2d 124, 124 (1992).
Although we consider Lerer’s disrespectful letter to the court to be inexcusably contemptuous, our granting of the writ in this case prompts us to dismiss all matters relating to contempt of court.
We also note that SCR 155, the rule governing attorney’s fees, states in pertinent part that: “5. A division of fee between lawyers who are not in the same firm may be made only if: ... . (b) the client is advised in writing of and does not object to the participation of all the lawyers involved . ...” In the instant case, Smith admitted during hearings that no written agreement existed between him and the Callottas, and there is nothing in the record indicating that the Callottas were informed in writing that Smith would be their attorney. Therefore, SCR 155 also invalidates Smith’s attempted lien against the Callottas’ settlement funds.
NRCP 41 states in pertinent part:
(a) Voluntary dismissal: Effect thereof.
(1) By plaintiff; By stipulation. . . . [A]n action may be dismissed by the plaintiff upon repayment of defendants’ filing fees, without order of court (i) by filing a notice of dismissal at any time before service by the adverse party of an answer or of a motion for summary judgment, whichever first occurs, or (ii) by filing a stipulation of dismissal signed by all parties who have appeared in the action.
“Rule 41(a)(1) is the shortest and surest route to abort a complaint when it is applicable. So long as plaintiff has not been served with his adversary’s answer or motion for summary judgment he [or she] need do no more than file a notice of dismissal with the Clerk. That document itself closes the file. There is nothing the defendant can do to fan the ashes of that action into life and the court has no role to play. This is a matter of right running to the plaintiff and may not be extinguished or circumscribed by adversary or court.”