
297 S.E.2d 606 (1982)
Dianne Greene HARDEE
v.
Eddie Ray HARDEE.
No. 8119DC1417.
Court of Appeals of North Carolina.
November 16, 1982.
*609 Koontz & Hawkins by Timothy M. Hawkins, Concord, for plaintiff, appellee.
Myers, Ray & Myers by Charles T. Myers, Charlotte, for defendant, appellant.
HEDRICK, Judge.
Defendant first contends in his Assignment of Error No. 1, based on Exception Nos. 4, 9 and 17, that the Court erred in finding him in contempt of court for filing a petition for partition or sale of the real property, which the plaintiff occupied under a 13 March 1981 order giving her possession of the real estate for support of the child born of plaintiff and defendant. The applicable statute in effect at the time the order was signed was G.S. § 50-13.4(e) which reads:
Payment for the support of a minor child shall be paid by lump sum payment, periodic payments, or by transfer of title or possession of personal property of [sic] any interest therein, or a security interest in real property, as the court may order. In every case in which payment for the support of a minor child is ordered and alimony or alimony pendente lite is also ordered, the order shall separately state and identify each allowance.
Effective 18 June 1981, G.S. § 50-13.4(e) was amended to read in pertinent part:
Payment for the support of a minor child shall be paid by lump sum payment, periodic payments, or by transfer of title or possession of personal property of [sic] any interest therein, or a security interest in or possession of real property, as the court may order. (Emphasis added.)
Thus, it is clear that on 13 March 1981 the Court lacked authority to award the possession of real property as a part of the support for the minor child. The amendment to G.S. § 50-13.4(e) did not affect the validity of any existing order or judgment and applied only to hearings and trials conducted after 18 June 1981. Since the trial Judge on 13 March 1981 lacked authority to award possession of the property to the wife for the support of the child, it also lacked authority to order that the defendant not attempt to dispose of the property except by mutual consent of the parties. Therefore, the Court had no authority to declare defendant in contempt of an order which it lacked authority to enter. Joyner v. Joyner, 256 N.C. 588, 124 S.E.2d 724 (1962); accord, Webb v. Webb, 50 N.C.App. 677, 274 S.E.2d 888 (1981); Collins v. Collins, 18 N.C.App. 45, 196 S.E.2d 282 (1973). The order adjudging the defendant in contempt must be vacated.
Defendant next assigns error to the denial of his motions to alter or set aside the custody order upon the grounds of a change in condition. The findings and conclusions of the trial judge support his order denying the defendant's motion to alter or *610 set aside the custody order and these findings and conclusions are amply supported by the record and the evidence.
The defendant also assigns as error the denial of his motion to hold the plaintiff in contempt. The evidence and record support the trial judge's order denying this motion.
Defendant argues the Court erred in awarding attorney fees to plaintiff's attorney. Inasmuch as this proceeding was initiated by the plaintiff's motion to find the defendant in contempt for filing a petition to partition or sell the real estate owned by plaintiff and defendant and since the trial judge erred in holding the defendant in contempt for violation of an invalid order, we hold the trial court likewise erred in awarding attorney fees to plaintiff's attorney under the circumstances. The motions filed by defendant and denied by the Court were obviously defensive, and the plaintiff would not have incurred expenses for an attorney if she had not initiated the proceeding to find and hold defendant in contempt. The order awarding plaintiff's counsel a fee of $500 must be vacated.
The result is: the orders holding the defendant in contempt and awarding attorney fees to plaintiff's counsel are vacated; the orders denying the defendant's motions to alter or set aside the orders granting plaintiff custody of the child, to hold plaintiff in contempt of court, to declare the writ of possession a cloud upon title and to dismiss plaintiff's motions are affirmed.
Affirmed in part; vacated in part.
HILL and WHICHARD, JJ., concur.
