
414 So.2d 72 (1982)
Ex Parte ANONYMOUS, a Minor.
(Re In the Matter of ANONYMOUS, a child under the age of 18 years.)
80-845.
Supreme Court of Alabama.
May 21, 1982.
*73 George B. Gordon, Tuscaloosa, for petitioner.
Charles A. Graddick, Atty. Gen., and Algert S. Agricola, Jr., Asst. Atty. Gen., for respondent.
James G. Lee of Lee, Barrett & Mullins, Tuscaloosa, for amicus curiae Tuscaloosa County.
Mary Lee Stapp, Clyde P. McLendon, and William Prendergast, Asst. Attys. Gen. and counsel for the Dept. of Pensions and Security of the State of Alabama, amici curiae.
PER CURIAM.
This matter was begun by a petition filed in the Juvenile Court of Tuscaloosa County by the Department of Pensions and Security. It apparently sought to establish the paternity of an illegitimate child under § 26-12-1, et seq., Ala.Code 1975, and the petition also alleged that the respondent (petitioner here) was a child in need of supervision, defined in § 12-15-1(4), Ala. Code 1975, as a child who "has committed an offense established by law but not classified as criminal or one applicable only to children."
The trial court, after determining that the juvenile was financially unable to obtain counsel, appointed counsel to represent him, as authorized by Act No. 81-717, Acts of Alabama, 1981 (§ 15-12-21, Ala.Code 1975).
Counsel for the juvenile thereupon filed a motion for blood tests pursuant to § 26-12-5, which provides in pertinent part:
"In any illegitimacy case the court, upon application made by the reputed father whose blood is involved, shall order the mother, child and reputed father to submit to one or more blood tests to determine whether or not the accused can be excluded as the father of the child. No such blood test of any child shall be taken before the child reaches the age of six months. Whenever the court orders any such blood test to be taken and the mother shall refuse to submit either herself or the child to the test, such fact shall be disclosed upon the trial unless good cause is shown for not doing so. Any tests shall be made by an expert qualified as an examiner of blood types, and he shall be appointed by the court. The court shall fix the compensation of any expert at a reasonable amount and may direct the same to be paid by the county or any other party to the case or by both, in such proportions and at such times as the court shall prescribe. Prior to the making of said test, the court may order any part or all of the said compensation paid in advance."
The trial court refused to order blood tests, and the juvenile then filed this petition for writ of mandamus, asking this Court to direct the trial judge to order the blood tests, which he asserts are mandatory under § 26-12-5, and further to direct the trial court to order the County of Tuscaloosa to pay the cost of such tests, as it has the authority to do under § 26-12-5, or alternatively to direct the trial court to approve the cost of performing such blood tests as a reasonable expense incurred in the juvenile's defense, thereby enabling the attorney to be reimbursed by the state as provided in Act No. 81-717 (§ 15-12-21, Code), which provides:
"(d) Counsel appointed [in a juvenile indigency case] shall be entitled to receive for their services a fee to be approved by the trial court. The amount of such fee shall be based on the number of hours *74 spent by the attorney in working on such case and shall be computed at the rate of $40.00 per hour for time expended in court and $20.00 per hour for time reasonably expended out of court in the preparation of such case. The total fees to any one attorney in any one case, from the time of appointment through the trial of the case, including motions for new trial, shall not, however, exceed $1,000.00. Counsel shall also be entitled to be reimbursed for any expenses reasonably incurred in such defense to be approved in advance by the trial court, but in no individual case shall such expenses exceed one-half of the allowable attorney fees provided in this section.
"(e) Within a reasonable time after the conclusion of the trial or ruling on a motion for a new trial or after an acquittal or other judgment disposing of the case, counsel shall submit to the trial court a bill for services rendered, not to exceed the amount provided in subsection (d) of this section, and such bill, if approved by the trial court, shall be submitted by the clerk of the court to the state comptroller for audit and allowance and, if approved by the comptroller, shall be forwarded to the state treasurer for payment."
The legislature has made blood tests mandatory upon demand by the reputed father in a paternity proceeding under § 26-12-5, which also mandates that the trial court appoint an expert to conduct such tests. In both instances, the legislature uses the word shall, which we have traditionally held to be mandatory. However, as regards payment, the legislature leaves the source of the payment to the discretion of the trial court. It may direct payment by the county or any party to the case and, in this instance, the Department of Pensions and Security is a party. The trial court may, therefore, order payment by the state or the county by the authority conferred by § 26-12-5, if this is a true paternity case. However, on the petition before us, we cannot say that it is. It is described as a "hybrid" by the Department of Pensions and Security. Certainly the petition seeks two distinctly different determinations: one, that petitioner is a child in need of supervision under the juvenile code, and the other, that he is the putative father under the paternity statute.
Until a determination is made that this is a paternity case, the petitioner is not entitled to blood tests. The trial court, in refusing to order the requested blood tests, was justified in doing so if this is a juvenile proceeding with a goal of having the juvenile declared a child in need of supervision. Therefore, mandamus will not lie because the petitioner has not shown that the right to relief is clear.
WRIT DENIED.
TORBERT, C. J., and MADDOX, JONES, SHORES and BEATTY, JJ., concur.
