
550 S.E.2d 617 (2001)
209 W.Va. 639
James M. POWELL, Esquire, and J.C. Powell, Esquire, Doing Business as Powell Law Offices, Petitioners Below, Appellants,
v.
WOOD COUNTY COMMISSION, David Couch, Commissioner, Robert Tebay, Jr., Commissioner, Holmes R. Shaver, Commissioner, Respondents Below, Appellees
No. 28456.
Supreme Court of Appeals of West Virginia.
Submitted January 23, 2001.
Decided June 8, 2001.
*619 James M. Powell, Esq., J.C. Powell, Esq., Parkersburg, West Virginia, Attorneys for Appellants.
Honorable Virginia A. Conley, Wood County Prosecuting Attorney, Parkersburg, West Virginia, Attorney for Appellees.
*618 MCGRAW, Chief Justice:
Members of a law firm appeal the lower court's denial of their request for a writ of mandamus. An employee of the firm had been appointed by the circuit court to represent an indigent client, and the client subsequently sued the law firm for malpractice. The firm's members sought a writ of mandamus to compel the appellee, the Wood County Commission, to indemnify the law firm for costs it incurred in defending the malpractice suit. The Circuit Court of Wood County dismissed appellants' case and we reverse, granting the writ as moulded.

I.

FACTUAL AND PROCEDURAL BACKGROUND
James M. Powell and J.C. Powell practice law in Wood County, West Virginia under the business name of Powell Law Offices. On August 13, 1996, the Circuit Court of Wood County appointed a lawyer who then worked for Powell Law Offices to represent one Luly Bell Parkins in a dispute over her parental rights. The court made this appointment pursuant to W. Va.Code § 29-21-9 (1996), which establishes procedures for the appointment of legal counsel to indigent citizens, and W. Va.Code § 29-21-20 (1989), which shields appointed counsel from liability from suit.
The underlying litigation displeased Ms. Parkins, who on December 23, 1996, filed a federal lawsuit in the Southern District of West Virginia seeking $40,000,000 in compensatory damages and $40,000,000 in punitive damages for alleged wrongs she suffered in connection with the state's efforts to terminate her parental rights. Casting a wide net, Ms. Parkins sued her appointed counsel, then employed by Powell Law Offices, and two Wood County judges, an assistant county prosecutor, the circuit court clerk, a deputy sheriff, and a state child welfare worker.
Appellants gave notice to their own, private malpractice insurance carrier in December of 1996. Appellants attempted, without success, to contact the insurance carrier for the Wood County Commission, whom they either considered to be their nominal "employer" while their firm represented Ms. Parkins, or whom they considered to be responsible for the defense of any action against them. In the absence of any defense efforts made by the county or state on behalf of the appellants, their own insurance carrier advised them to forward the federal complaint to the firm of Bowles, Rice, McDavid, Graff and Love for legal representation.
On April 9, 1997, the federal court dismissed Ms. Parkins' lawsuit, but denied appellants' motion for attorney fees. According to appellants, those fees amounted to $5,839.35. The appellants filed suit against the Wood County Commission, seeking a writ of mandamus to compel indemnification for the costs of defending the malpractice suit. On February 4, 2000, the circuit court dismissed the case, and appellants now seek redress before this Court.[1]

II.

STANDARD OF REVIEW
Appellants seek a reversal of the circuit court's dismissal of their case. We have held that: "Appellate review of a circuit court's order granting a motion to dismiss a complaint is de novo." Syl. pt. 2, State ex rel. McGraw v. Scott Runyan Pontiac-Buick, Inc., 194 W.Va. 770, 461 S.E.2d 516 (1995). Appellants request a writ of mandamus requiring the appellee to pay the costs they incurred. As we stated in our oftencited *620 case of Cooper v. Gwinn, 171 W.Va. 245, 298 S.E.2d 781 (1981):
Before this Court may properly issue a writ of mandamus three elements must coexist: (1) the existence of a clear right in the petitioner to the relief sought; (2) the existence of a legal duty on the part of the respondent to do the thing the petitioner seeks to compel; and (3) the absence of another adequate remedy at law.
Syl. pt. 3, Cooper v. Gwinn, 171 W.Va. 245, 298 S.E.2d 781 (1981); Accord, Parks v. Board of Review, 188 W.Va. 447, 425 S.E.2d 123 (1992).

III.

DISCUSSION
Appellants argue that, because appointed counsel is statutorily immune from liability in cases such as these, that they should also be indemnified for any costs they incurred. They point out that, in the absence of indemnification, immunity offers limited protection. The county commission argues that, while appointed counsel is immune, nothing in the law requires the commission to indemnify the appellants for amounts not covered by their malpractice insurance, or for any costs incurred in the defense of a malpractice action.
The statute that governs this case clearly limits the liability of any attorney appointed by a court pursuant to W. Va.Code § 29-21-1, et seq.:

Appointed counsel immune from liability
Any attorney who provides legal representation under the provisions of this article under appointment by a circuit court or by the supreme court of appeals, and whose only compensation therefor is paid under the provisions of this article, shall be immune from liability arising from that representation in the same manner and to the same extent that prosecuting attorneys are immune from liability.

W. Va.Code § 29-21-20 (1989)(emphasis added). While very specific regarding immunity from liability, the statute is silent as to the appointed attorney's immunity from the costs of defending any suit. When faced with this silence, it is our obligation to ascertain, as best we can, the intent of the Legislature in enacting the statute in question:
It is the duty of a court to construe a statute according to its true intent, and give to it such construction as will uphold the law and further justice. It is as well the duty of a court to disregard a construction, though apparently warranted by the literal sense of the words in a statute, when such construction would lead to injustice and absurdity.
Syl. pt. 2, Click v. Click, 98 W.Va. 419, 127 S.E. 194 (1925). Accord, Roberts v. Consolidation Coal Co., 208 W.Va. 218, 539 S.E.2d 478 (2000). Or, in other words: "The primary object in construing a statute is to ascertain and give effect to the intent of the Legislature." Syl. pt. 1, Smith v. State Workmen's Compensation Commissioner, 159 W.Va. 108, 219 S.E.2d 361 (1975).
We note that the hourly compensation paid by the state for representation of indigent parties is not highly remunerative. While some attorneys may specialize in such cases and find them rewarding, all face a limited financial recovery for this serious and demanding work. It may be that part of the reason attorneys take such cases is that our law protects them from personal liability. However, if the immunity offered by W. Va.Code § 29-21-20 (1989) does not also protect the attorney from expenses incurred in defending a malpractice suit, then the appointed attorney may face enormous financial uncertainty. Because of the challenges we already face in attracting competent attorneys to the appointed defense of indigent clients, we wish to take no action that might further discourage members our bar from taking such cases.
The appellants' firm provided, from all accounts, competent representation to their appointed client. When sued, appellants incurred reasonable expenses in their defense. The statute promises that appointed counsel "shall be immune from liability arising from that representation in the same manner and to the same extent that prosecuting attorneys are immune from liability. "When the lower court refused to indemnify the appellants for the reasonable costs of their defense, it essentially stripped appellants of some of that promised immunity.
The Legislature was extremely specific in placing appointed counsel on the same *621 footing with prosecuting attorneys with respect to immunity from liability. Thus we find that the lower court erred by refusing to grant the appellants full immunity under W. Va.Code § 29-21-20 (1989). We hold that when a court appoints a private attorney to represent a client pursuant to W. Va.Code § 29-21-1, et seq., and that client then sues the attorney for malpractice in connection with that representation, the attorney shall be immune from liability arising from that representation in the same manner and to the same extent that prosecuting attorneys are immune from liability.
Because a prosecuting attorney sued for performing his or her official duties does not bear the cost of his or her defense, any grant of immunity to appointed counsel would be cold comfort without the same protection. Thus we find that the immunity from liability contained in W. Va.Code § 29-21-20 (1989) implicitly indemnifies appointed counsel for any costs incurred in the defense of any suit arising out of the appointed representation.
Apparently the appellants sued the Wood County Commission for indemnification on the theory that, because the Commission would bear the cost of defending a suit against the Prosecuting Attorney, and because the statute commands that appointed counsel shall be immune from liability in the same manner as prosecuting attorneys, that the Commission must therefore be responsible for appellants' defense costs.
We note that, when those performing an official duty for the State of West Virginia or one of its political subdivisions are sued for their official actions, ultimately the State Board of Risk and Insurance Management administers the defense of that lawsuit:
(a) The board shall have general supervision and control over the insurance of all state property, activities and responsibilities, ....
(b) If requested by a political subdivision or by a charitable or public service organization, the board is authorized to provide property and liability insurance to the political subdivisions or such organizations to insure their property, activities and responsibilities. Such board is authorized to enter into any necessary contract of insurance to further the intent of this subsection.
W. Va.Code § 29-12-5 (1996).[2]
The County Commission argues that it never appointed, retained, or paid the appellants. While some might debate whether the appointed counsel "works for" Public Defender Services, an executive agency,[3] or for the County Commission, or for the Circuit Court, we need not enter this debate to reach our decision in this case. It is clear that the Board of Risk and Insurance Management would administer the defense of a suit against any person performing an official duty for any of those named entities, including a county commission. Because it is equally apparent that the Board of Risk and Insurance Management ultimately would bear the cost of defense for any prosecuting attorney sued for performing his or her official duties, we find that the Board must do *622 the same for any appointed counsel, in order to give effect to the "in the same manner and to the same extent" language of W. Va.Code § 29-21-20 (1989).
Thus we order the County Commission of Wood County to indemnify appellants for the cost of their defense and we hold that when an attorney appointed pursuant to W. Va.Code § 29-21-1, et seq., is sued for malpractice in connection with that representation and the attorney actually incurs costs in defending such suit, the costs incurred are ultimately chargeable to the State Board of Risk and Insurance Management.[4]

IV.

CONCLUSION
For the reasons set forth above, the appellants' Petition for a Writ of Mandamus is granted, as moulded, and the County Commission of Wood County is directed to pay the appellants the sum of $5,839.35, such sum to be collected by the appellees from the State Board of Risk and Insurance Management.
Writ granted as moulded.
NOTES
[1]  The court also dismissed appellants' motion for enforcement of a settlement agreement they allege to have made with the prosecuting attorney. Because we find that appellants are entitled to recover for other reasons, we decline to address this issue.
[2]  Originally called the "state board of insurance," the board was renamed the "state board of risk and insurance management" by statute. W. Va.Code § 29-12-12 (1998).
[3]  Although appointed attorneys work in the judicial branch, the entity that directs the defense of the indigent is an executive agency:

There is hereby created an executive agency known as public defender services. The agency shall administer, coordinate and evaluate programs by which the state provides legal representation to indigent persons, monitor the progress of various delivery systems and recommend improvements....
W. Va.Code § 29-21-3 (2000). The funds that pay for appointed counsel ultimately come from this agency:
(a) All panel attorneys shall maintain detailed and accurate records of the time expended and expenses incurred on behalf of eligible clients, and upon completion of each case, exclusive of appeal, shall submit to the appointing court a voucher for services. Claims for fees and expense reimbursements shall be submitted to the appointing court on forms approved by the executive director. Claims submitted more than four years after the last date of service shall be rejected.
The appointing court shall review the voucher to determine if the time and expense claims are reasonable, necessary and valid, and shall forward the voucher to the agency with an order approving payment of the claimed amount or of a lesser sum the court considers appropriate.
W. Va.Code § 29-21-13a (1997).
[4]  Nothing in this holding affects the primacy of one insurance policy over another, when more than one might cover a given claim. We merely hold that appointed counsel must not bear the cost of defense when appointed pursuant to W. Va.Code § 29-20-1, et seq.
