
649 S.W.2d 150 (1983)
Antonio Guzman MACIAS, Appellant,
v.
The STATE of Texas, Appellee.
No. 08-82-00119-CR.
Court of Appeals of Texas, El Paso.
March 30, 1983.
*151 Joseph S. Chagra, Richard, D. Esper, El Paso, for appellant.
Steve Simmons, Dist. Atty., El Paso, for appellee.
Before STEPHEN F. PRESLAR, C.J., and WARD and OSBORN, JJ.

OPINION
STEPHEN F. PRESLAR, Chief Justice.
This is an appeal from an order revoking probation. We affirm.
In November, 1978, Appellant entered a plea of guilty before the court to the offense of delivery of a controlled substance, to wit: heroin. Punishment was assessed at ten years, but the imposition of sentence was suspended and Appellant was placed on probation. Among the conditions of probation was the requirement that Appellant
b Avoid injurious or vicious habits, to wit:
(2) You shall not purchase, sell, introduce into your body by any means, possess, or transport any controlled substance as set out in the Texas Controlled Substance Act of 1973, as amended, except upon prescription of a person licensed to prescribe the same.
Although the original conditions of probation did not mandate a regular schedule for urinalysis tests, Appellant submitted to such testing until August, 1981. In August, 1981, the conditions of probation were modified in response to a request made by him to consider a recommendation for early discharge. As a prerequisite for this consideration, the conditions were modified to regularize urinalysis testing whereby he would submit to such a test given by or under the direction of his probation officer every Tuesday until there was no longer any evidence of drug abuse.
In February, 1982, the State filed a motion to revoke probation wherein it was alleged that Appellant had violated the above-described probationary conditions. On February 26, 1982, the court conducted a hearing on such motion at the conclusion of which Appellant's probation was revoked on the grounds alleged in the State's motion. Sentence was then imposed.
At the hearing, there was evidence that Appellant had submitted to a urinalysis test on January 5, 1982. The lab technician, who conducted the test, testified that the results therefrom detected the presence of marihuana in Appellant's body. She interpreted the results as revealing a recent ingestion of the substance. Appellant's probation officer testified that Appellant had failed to submit himself to a urinalysis test on January 19, 1982, and on all of the required dates thereafter.
In his only ground of error, Appellant challenges the constitutionality of the mandatory urinalysis test as a condition of his probation. He asserts that such a condition constitutes a warrantless and unreasonable search and seizure in violation of the Fourth Amendment, United States Constitution. See also: Art. I, sec. 9, Texas Constitution.
The taking of a urine sample is analogous to the taking of a blood sample. Each involves an extraction from a human body. It has been held that the taking of blood constitutes a search and seizure under federal and state constitutional law. Schmerber v. California, 384 U.S. 757, 86 S.Ct. 1826, 16 L.Ed.2d 908 (1966); Escamilla *152 v. State, 556 S.W.2d 796 (Tex.Cr.App.1977) Absent the consent of a defendant in custody, a blood sample may be taken from him upon the State's issuance of a search warrant and compliance with the provisions of Article 1.06 and Chapter 18 of the Code of Criminal Procedure. Gentry v. State, 640 S.W.2d 899 (Tex.Cr.App.1982); Ferguson v. State, 573 S.W.2d 516 (Tex.Cr.App.1978).
We have no doubt that the taking of a urine sample constitutes a search and seizure within the scope of the holdings in the above-cited cases. However, that is not the controlling issue now before this Court. None of the cases cited dealt with the constitutionally of a urinalysis test as a condition of probation. It is that precise issue which must now be determined and which appears to be one of first impression for the courts of this State.
Probation in the instant case was granted under the provisions of Article 42.12 of the Code of Criminal Procedure. While a urinalysis test is not one of the suggested statutory conditions listed in sec. 6 of the article, the court is not limited to those statutory conditions where it grants probation. The court has wide discretion in selecting reasonable conditions of probation. Pursuant to the provisions of the statute, the permissible conditions should have a reasonable relationship to the treatment of the accused and the protection of the public. Tamez v. State, 534 S.W.2d 686 (Tex.Cr. App.1976).
Without question, the protection against unreasonable searches and seizures applies to probationers. Owens v. Kelley, 681 F.2d 1362 (11th Cir.1982); Davis v. State, 576 S.W.2d 378 (Tex.Cr.App.1978); Tamez, supra at 692. See also: Gagnon v. Scarpelli, 411 U.S. 778, 93 S.Ct. 1756, 36 L.Ed.2d 656 (1973); Morrissey v. Brewer, 408 U.S. 471, 92 S.Ct. 2593, 33 L.Ed.2d 484 (1972). A probationer, like a parolee, has the right to enjoy a significant degree of privacy. United States v. Conseulo-Gonzalez, 521 F.2d 259 (9th Cir.1975); Basaldua v. State, 558 S.W.2d 2 (Tex.Cr.App.1977); Tamez, supra at 692.
Probationers, however, are subject to limitations from which ordinary citizens are free. Gonsuelo-Gonzalez, supra at 265. Any restriction upon their otherwise inviolable constitutional rights can be justified only to the extent actually necessitated by the legitimate demands of the probation process. A probationer has a diminished expectation of privacy by virtue of these demands, but his expectation may be diminished only to the extent necessary for his reformation and rehabilitation. Owens, supra at 1367; Tamez, supra at 692.
In United States v. Tonry, 605 F.2d 144 (5th Cir.1979), the court held that a probation condition is not necessarily invalid simply because it affects a probationer's ability to exercise constitutionally protected rights. In setting forth the test to determine whether a probation condition is unduly intrusive on constitutionally protected freedoms, the court wrote:
The conditions must be "reasonably related" to the purposes of the [Federal Probation] Act. Consideration of three factors is required to determine whether a reasonable relationship exists: (1) the purposes sought to be served by probation; (2) the extent to which constitutional rights enjoyed by law-abiding citizens should be accorded to probationers; and (3) the legitimate needs of law enforcement.
Upon examining the modified condition of Appellant's probation that he submit to a weekly urinalysis test, it is clear that such is reasonably related to the purposes of probation under Texas Law. As a warrantless search condition, it seeks to rehabilitate Appellant in two ways. First, it seeks to dissuade him from possessing illegal drugs by making him cognizant that unlawful possession can be discovered at any time. Second, the condition promotes his rehabilitation by providing his probation officer with a practical mechanism to determine whether rehabilitation is indeed taking place. Additionally, the condition advances the probationary purpose of protecting society by acting as a deterrent upon Appellant and by enhancing the ability of his probation *153 officer to detect unlawful narcotics activities in which he may engage. See: Owens, supra at 1367.
The terms of the condition cannot be construed as requiring Appellant to submit to the urinalysis tests in an unreasonable manner. He was required to submit to the tests given by or under the direction of his probation officer and on a weekly basis only. This requirement was imposed in response to a request made by Appellant to consider a recommendation for early discharge. Its effect was to regularize the testing to which he had been previously submitting. The terms are not so overly broad and unrestricted as to authorize an intimidating and harassing search to serve law enforcement ends totally unrelated to either Appellant's conviction or rehabilitation. Owens, supra at 1368; Consuelo-Gonzalez, supra at 265; Tamez, supra at 692.
For a comprehensive discussion of cases dealing with the validity of the requirement that, as a condition of probation, a defendant submit to a warrantless search, see: Annot., 79 A.L.R.3d 1083 (1977).
We hold that the terms requiring Appellant to submit to a weekly urinalysis test given by or under the direction of his probation officer, as a condition of his probation, do not constitute an unreasonable search and seizure in violation of Appellant's constitutional rights. The order revoking probation is affirmed.
