
    Anita RODEHEAVER, County Clerk of Harris County, Texas, Nikki Van Hightower, County Treasurer of Harris County, Texas, J.F. Flack, County Auditor of Harris County, Texas, and Harris County, Appellants, v. Peter S. STEIGERWALD and R.C. Smith, Appellees.
    No. B14-90-020-CV.
    Court of Appeals of Texas, Houston (14th Dist.).
    March 7, 1991.
    Rehearing Denied March 21, 1991.
    
      A.B. Crowther, Jr., Houston, for appellants.
    C. Charles Dippel, Houston, for appel-lees.
    Before ROBERTSON, SEARS and DRAUGHN, JJ.
   OPINION ON MOTION FOR REHEARING

SEARS, Justice.

Harris County has filed a motion for rehearing limited to the issue of the award of attorneys fees. On original submission, we held that a governmental unit is not immune from liability for attorney’s fees under the Uniform Declaratory Judgment Act. We cited as authority Duncan v. Pogue, 759 S.W.2d 435 (Tex.1988). The county asserts Duncan “is not really dis-positive of the issue” because the “defensive issue of sovereign immunity was not discussed.” We agree and believe our disposition of the issue deserves more discussion. Neither the supreme court per cu-riam opinion in Duncan nor the court of appeals opinion (753 S.W.2d 255), which the supreme court reversed, discusses the context in which the issue arose. From the court of appeals opinion, it appears the issue of the award of attorney’s fees was raised for the first time on appeal. If this is true the issue was waived, Davis v. City of San Antonio, 752 S.W.2d 518 (Tex.1988), and reliance upon it for the proposition of law we state is not justified.

From the record before us, the real issue facing us is whether the county waived the issue of sovereign immunity from liability for attorney’s fees. Since the county did not plead the issue in its answer, it would have been indisputably waived but for the manner in which it was presented at trial.

Prior to trial, the court granted plaintiff’s motion for partial summary judgment and denied the county’s motion to litigate certain issues before the jury. Therefore, the court narrowed the issues to be tried before the jury to “damages,” and on June 19, 1989, ordered a hearing be set at a date convenient to all parties. A joint pre-trial order was signed by the trial judge and counsel for both plaintiffs and the defendant on August 14, 1989. The order was nine pages in length. Under the heading “AGREED APPLICABLE PROPOSITIONS OF LAW” the parties stated “There are none.” Under the heading “CONTESTED ISSUES OF LAW” was the following:

PLAINTIFF’S POSITION:
The County contests that attorney’s fees can be awarded against it under the declaratory judgment act (Section 37.009, Civil Practice and Remedies Code) because of sovereign immunity. Smith and
Steigerwald say that consent to sue the County has been given and this is not a tort action, thus sovereign immunity has no application. Legal memoranda are attached.
DEFENDANTS’ POSITION:
1. ...
2. ...
3. ...
4. That the Plaintiffs are not entitled to attorney’s fees under the Declaratory Judgment Act, due to the doctrine of sovereign immunity.

“Plaintiffs Legal Memorandum on Attorney’s Fees,” attached to the pretrial order, did not assert that the county had waived the issue of sovereign immunity by failing to plead it, but instead asserted:

The Supreme Court has held that attorney’s fees can be awarded against governmental entities under § 37.009. Duncan v. Pogue, 759 S.W.2d 435 (Tex.1988). The County will contend that the concept of sovereign immunity prevents an award of attorney’s fees against it. The County’s contention and any cases supporting it are flawed because
1. Sovereign immunity involves two distinct concepts: Consent to sue government in the courts of the state and immunity from liability for the torts committed by government’s employees, agents and representatives. 27 Tex.L.Rev. 337 (1949); 44 Tex.L.Rev. 151 (1965); Greenhill and Murto, “Governmental Immunity,” 49 Tex.L.Rev. 462 (1971).
2. This is not a tort case, and consent to sue has been given. § 81.041, Local Government Code.
3. This is a declaratory judgment action.
Sovereign immunity has no application to this case.

The county attached to the pretrial order a photocopy of the three cases it relied upon in support of its position that the doctrine of sovereign immunity precluded an award of attorney’s fees: City of Houston v. Lee, 762 S.W.2d 180 (Tex.App.— Houston [1st Dist.] 1988, writ denied); Texas Dept. of Human Services v. Methodist Retirement Services, Inc., 763 S.W.2d 613 (Tex.App. — Austin 1989, no writ), and City of Houston v. De Trapani, 771 S.W.2d 703 (Tex.App. — Houston [14th Dist.] 1989, writ denied).

At trial, the county objected to the submission of the attorney fee question to the jury, and following the verdict filed a motion to disregard those findings. Finally, the county filed a motion for new trial contesting the attorney fee award. In all three of these instances, the sovereign immunity defense was asserted. It is interesting to note that plaintiffs also filed a motion to disregard the jury findings on attorney’s fees, contending: (1) that their cause of action was a § 1983 civil rights action and, therefore it was the duty of the court, not the jury, to assess the fees; and that (2) “plaintiffs have also sued under the Declaratory Judgment Act” and that in such action “the great weight of authority is that the Court determines the attorney’s fees in its discretion.” Accordingly, the plaintiffs requested the court to disregard the jury’s answers and that “the Court find attorneys fees as requested.” This history has been set out to show how the issue was raised in the trial court and to further show that the plaintiffs never asserted, prior to the filing of an appellate brief, that the county had waived the doctrine of sovereign immunity by failing to plead it. Further, we find the issue was tried by consent of the parties.

The rule is well settled that an affirmative defense may be tried by consent, even if it is not properly plead. Gulf & Basco Co. v. Buchanan, 707 S.W.2d 655 (Tex.App. — Houston [1st Dist.] 1986, writ ref’d n.r.e.); Liveoak v. Ingham, 644 S.W.2d 566 (Tex.App. — El Paso 1982, writ ref’d n.r.e.); Realtex Corp. v. Tyler, 627 S.W.2d 441 (Tex.App. — Houston [1st Dist.] 1981, no writ); La Margue Independent School Dist. v. Thompson, 580 S.W.2d 670 (Tex.Civ.App. — Houston [14th Dist.] 1979, no writ); Whitley v. Whitley, 566 S.W.2d 660 (Tex.Civ.App. — Beaumont 1978, no writ). The question here was clearly brought before the court not only by consent, but also by the active assistance of both parties. Gulf & Basco, 707 S.W.2d at 657. The issue is therefore properly before us.

Attorney’s fees are not recoverable against a governmental entity under the Declaratory Judgment Act. De Trapani, 771 S.W.2d at 708; Texas Dept. of Human Services, 763 S.W.2d at 614; Lee, 762 S.W.2d at 188. Since there is no authority for the assessment of attorney’s fees against the county when the defense of sovereign immunity has been raised, we grant its motion for rehearing and modify the judgment to delete the award of attorney’s fees. We affirm the remainder of the judgment.  