
617 S.W.2d 329 (1981)
Janis Pierce WILSON, Appellant,
v.
TEACHER RETIREMENT SYSTEM OF TEXAS, Appellee.
No. 9225.
Court of Civil Appeals of Texas, Amarillo.
May 26, 1981.
Rehearing Denied June 17, 1981.
*330 Crenshaw, Dupree & Milam, James L. Gorsuch, Lubbock, for appellant.
Mark White, Atty. Gen. of Texas, Robert W. Gauss, Asst. Atty. Gen., Austin, for appellee.
REYNOLDS, Chief Justice.
Janis Pierce Wilson brings this appeal from a take-nothing summary judgment rendered in her action to recover funds held by the Teacher Retirement System of Texas to her ex-husband's account and assigned to her by a property settlement agreement incorporated in a divorce decree. Because the attempted assignment violates the law, we affirm.
Ms. Wilson and Charles Edward Wilson, Jr., were married in 1956. In September of 1964, Mr. Wilson became, and remains, a member of the Texas Teacher Retirement System. A 22 January 1979 decree of divorce dissolved the marriage of the Wilsons, who had executed an agreement for the division of their estate. Paragraph 11c of the agreement reads:
Husband [Charles Edward Wilson, Jr.] hereby agrees and does hereby assign to Wife [Janis Pierce Wilson] for her present use and enjoyment ONE HUNDRED PERCENT (100%) of all benefits held as of January 1, 1979, in the account of Husband by the Texas Teacher Retirement System and agrees, authorizes and directs the Texas Teacher Retirement System to immediately deliver such funds to Wife.
In the alternative, if such assignment is not effective for any reason, Husband hereby directs and authorizes the Teacher Retirement System to pay directly to Wife as such funds become payable under the terms of such plan, the portion of sum to which she is entitled under this agreement and the Court's decree.
If for any reason any funds to which Wife is entitled come into the possession or control of Husband, the Husband hereby declares himself to be a Trustee, for Wife's benefit, of (a) all his present vested rights in, (b) all his expectancies in, and (c) all pension or retirement benefits that hereinafter may be distributed from the account of contributions made by or on behalf of Husband prior to January 1, 1979.
In granting the divorce, the court ordered that the agreement "be and is approved and incorporated into this decree by reference as if it were recited herein verbatim." The decree further declared that:
Respondent, Janis Pierce Wilson, is awarded all funds held in the account of Charles Edward Wilson, Jr. by the Texas Teacher Retirement System as of January 1, 1979, and Respondent is entitled to same immediately.
As of 1 January 1979, Mr. Wilson's savings account with the Teacher Retirement System of Texas (System) contained 10,460.99 dollars. The System did not meet Ms. Wilson's demand for the payment of the funds, and this litigation ensued.
By her live pleadings, Ms. Wilson prayed for judgment either (1) in the amount of the funds as of 1 January 1979 pursuant to the divorce decree, with interest from that date; or, alternatively, (2) for payment of the funds "if as and when they become payable to" Mr. Wilson. The System joined the issue by answering that because Mr. Wilson has remained an active participating member of the System, the provisions of the Texas Education Code do not permit the withdrawal or assignment of the accumulated contributions. The System also affirmatively pleaded it had no dispute with *331 that portion of the divorce decree providing that Mr. Wilson will be, at such times as he terminates his membership and receives the funds, trustee for the benefit of Ms. Wilson.
After requests for admissions of matters and for answers to interrogatories were propounded to and answered by the System, Ms. Wilson moved, with her affidavit, for summary judgment granting her the recovery for which she had pleaded. In her motion, she specifically asserted entitlement to judgment granting her, pursuant to the divorce decree, the funds immediately. Following a stipulation to certain facts, the System moved for summary judgment that Ms. Wilson take nothing. Each movant responded, in turn, to the other's motion for summary judgment.
Considering the record, the trial court denied Ms. Wilson's motion, granted the System's motion, and rendered summary judgment that Ms. Wilson take nothing. This appeal is from that judgment.
At the outset, the predicate for Ms. Wilson's claim must be identified. She submits, and the System has not disagreed, that the divorce decree awarded her the funds, payable immediately. The nature of the decree is misperceived.
While a divorce decree may be, and frequently is, in the nature of a judgment ordering a division of the estate of the parties under authority of the Texas Family Code,[1] it also may, in dividing the estate, partake of the nature of a contract. Mobley v. Mobley, 221 S.W.2d 565, 567 (Tex.Civ. App.San Antonio 1949, no writ). The nature of a contract is imparted to those provisions in a judgment which are based entirely upon the terms of a property settlement agreement between the parties. In rendering such a judgment, the court must strictly or literally comply with the agreement of the parties without differentiating between their stipulations. Wyss v. Bookman, 235 S.W. 567, 569 (Tex.Comm'n App. 1921, judgmt. adopted; holding approved). And to this extent, the judgment must be interpreted as if it were a contract between the parties, the interpretation thereof being governed by the laws relating to contracts, not the laws relating to judgments. McCray v. McCray, 584 S.W.2d 279, 281 (Tex.1979).
On the face and by the very language of the divorce decree, the provisions thereof relating to the award of the funds held by the System are based entirely upon the terms of the property settlement agreement between the Wilsons. This fact is further and overtly manifested by Ms. Wilson's alternative prayer for direct payment to her of the funds when they become payable, a provision of the agreement which is not, as was the agreement's provision for immediate payment of the funds, echoed in the decree itself. Thus, this portion of the divorce decree must be interpreted as if it were, as indeed it was, a contract between the Wilsons.
By the first two subparagraphs in paragraph 11c of their mutual agreement, Mr. Wilson sought to assign, and Ms. Wilson sought to receive by assignment, the funds held to his account by the System for either immediate payment to Ms. Wilson or payment directly to her when such funds become payable under the terms of the System's plan. However, the attempted assignment is specifically prohibited by a section of the statute which created Mr. Wilson's account. Tex.Educ.Code Ann. § 3.01 et seq. (Vernon 1972). Section 3.07 of the Code mandates that:
Retirement allowances, annuities, refunded contributions, optional benefits, money in the various accounts created by this chapter, or any other right accrued or accruing to any person under the provisions of this chapter are exempt from any state or municipal tax, levy, sale, garnishment, attachment, or any other process *332 whatsoever, and shall be unassignable except as provided in this chapter.[2]
Undoubtedly, the Wilsons intended to make a valid agreement; but, by the first two subparagraphs in paragraph 11c of their agreement, they sought to set at naught the law which prohibits the assignment. It is uniformly held by the decisions of our courts that a contract cannot impair the validity of any law, nor control or limit the provisions of a statute. Gorman v. Gause, 56 S.W.2d 855, 858 (Tex.Comm'n App.1933, judgmt. adopted). There can be no question that this principle is the settled law in this State. Rogers v. Traders & General Ins. Co., 135 Tex. 149, 139 S.W.2d 784, 786 (1940). Hence, the law will not enforce an agreement to do that which the same law says shall not be done, and we may not apply the law to sanction that which violates the law.[3]Texas Employers' Ins. Ass'n v. Tabor, 283 S.W. 779, 780 (Tex. Comm'n App.1926, judgmt. adopted). Accord, Rogers v. Traders & General Ins. Co., supra, 139 S.W.2d at 785-86.
Accordingly, the unenforceability of the contractual provisions of the divorce decree upon which Ms. Wilson must predicate her action precludes the recovery for which she pleaded. Consequently, Ms. Wilson failed to prove as a matter of law that she was, and the System established conclusively that it was, entitled to summary judgment on the issues expressly presented to the trial court. See City of Houston v. Clear Creek Basin Authority, 589 S.W.2d 671, 677-78 (Tex.1979).
Two material facts in this cause distinguish it from, and render inapposite, the cases of Teacher Retirement System of Texas v. Neill, 563 S.W.2d 873 (Tex.Civ. App.Waco 1978, writ ref'd n. r. e.), and Collida v. Collida, 546 S.W.2d 708 (Tex.Civ. App.Beaumont 1977, writ dism'd), upon which Ms. Wilson relies for the proposition that she is entitled to the funds at once. Here, the division of the funds held by the System was of a contractual, rather than of a judicial, nature, and indisputably Mr. Wilson is not now eligible to receive the funds. In both Neill and Collida, the division of the funds held by the system was ordered by a judicial decree and, at the time of the decree, the funds were payable. The ordered payments in Neill and Collida did not violate the law; here, rendition of judgment ordering the System to pay Ms. Wilson would be contrary to law.
The judgment is affirmed.
NOTES
[1]  "In a decree of divorce or annulment the court shall order a division of the estate of the parties in a manner that the court deems just and right, having due regard for the rights of each party and any children of the marriage." Tex.Fam.Code Ann. § 3.63 (Vernon 1975).
[2]  The exception is found in the statute's authorization for transfer of benefits to the beneficiary of one eligible to receive them. See Tex. Educ.Code Ann. § 3.31 et seq. (Vernon 1972); Woods v. Reilly, 147 Tex. 586, 218 S.W.2d 437, 443 (1949). It is undisputed that Mr. Wilson is not now eligible to receive the funds held to his account.
[3]  This is not to say that paragraph 11c of the agreement the Wilsons made is entirely unenforceable. By their language, the Wilsons intended the subparagraphs of that paragraph to be divisible ones and, although the law prohibits enforcement of the first two subparagraphs, they may be separated from the third subparagraph, which then may be enforced. See Raywood Rice Canal & Milling Co. v. Erp, 105 Tex. 161, 146 S.W. 155, 158-59 (1912). See also Lewis v. Davis, 145 Tex. 468, 199 S.W.2d 146, 149 (1947).
