
577 S.E.2d 810 (2003)
259 Ga. App. 600
MONROE
v.
TAYLOR.
No. A02A1931.
Court of Appeals of Georgia.
January 29, 2003.
Reconsideration Denied February 12, 2003.
*811 Deming, Parker, Hoffman, Green & Campbell, James T. Freaney, Norcross, for appellant.
Celeste F. Brewer, for appellee.
ELLINGTON, Judge.
Following the grant of his application for discretionary appeal in this child custody and support modification action, Austin Monroe, Jr. appeals from the DeKalb County Superior Court's order awarding attorney fees to Adrienne Taylor. Monroe contends that OCGA § 19-6-19(d), the basis for the attorney fee award, applies only when one party initiates an action for modification of child support following a final divorce decree. Because he and Taylor were never married, and because he initiated the action to modify custody, Monroe contends the trial court erred when it awarded Taylor attorney fees pursuant to OCGA § 19-6-19(d). For the following reasons, we affirm.
"When a question of law is at issue, as here, we owe no deference to the trial court's ruling and apply the `plain legal error' standard of review. Moreover, where it is apparent that a trial court's judgment rests on an erroneous legal theory, an appellate court cannot affirm." (Citations and punctuation omitted.) Suarez v. Halbert, 246 Ga. App. 822, 824(1), 543 S.E.2d 733 (2000).
The record shows the following: Monroe and Taylor, who were never married, had a child in 1993. In 1995, after the Department of Human Resources filed a child support recovery action on behalf of the child, the trial court entered orders providing for custody and support of the child. On November 30, 2000, Monroe filed an action against Taylor seeking a change in custody based on a change in conditions in Taylor's home. Taylor filed a counterclaim for increased child support based on a change in Monroe's financial condition and the child's needs. Taylor also sought attorney fees.
Monroe and Taylor resolved the custody dispute, leaving the child support issue for trial. After a bench trial, the trial court awarded Taylor increased child support, reserving the issue of attorney fees. After a hearing, the trial court awarded Taylor, as the prevailing party, attorney fees pursuant to OCGA § 19-6-19(d).
1. Monroe contends that use of the term "former spouse" to describe the parties who may file and respond to a petition for modification of child support in OCGA § 19-6-19 limits the attorney fees provisions to parties who were previously married.[1]
"As a general rule, Georgia law does not provide for the award of attorney fees even to a prevailing party unless authorized by statute or by contract. When awarded by statute, such fees may be obtained only pursuant to the statute under which the action was brought and decided." (Citations omitted.) Suarez v. Halbert, 246 Ga.App. at 824(1), 543 S.E.2d 733.
The Code section at issue here, OCGA § 19-6-19, appears in the chapter of the Domestic Relations Code entitled "Alimony and Child Support Generally." Although that chapter was patently conceived in the context of divorce and dissolution of marriage, Georgia courts have recognized the legislative intent to provide for the proper support of minor children whose parents never married, the same as for children whose parents do not remain married. "Once paternity is legally established, the child is on equal footing with all other children. The child is entitled to have both parents provide for his or her `maintenance, protection, and education.' OCGA § 19-7-24." (Footnote omitted.) Pruitt v. Lindsey, 261 Ga. 540, 541(2), 407 S.E.2d 750 (1991).
To further this policy, "the guidelines for computing the amount of child support *812 found in OCGA § 19-6-15(b) and (c), known as the `Child Support Guidelines,' are the expression of the legislative will regarding the calculation of child support and must be considered by any court setting child support." Pruitt v. Lindsey, 261 Ga. at 541(1), 407 S.E.2d 750. As we have held, the guidelines are mandatory and must be applied when calculating awards of child support, regardless of whether the child's parents ever married. Ganny v. Ganny, 238 Ga.App. 123, 127(6), 518 S.E.2d 148 (1999) (guidelines applied for child born out of wedlock); Martin v. Greco, 225 Ga.App. 752, 753-754(2), 484 S.E.2d 789 (1997) (same); Kennedy v. Adams, 218 Ga.App. 120, 123(4), 460 S.E.2d 540 (1995) (same); Batterson v. Groves, 204 Ga.App. 52, 53, 418 S.E.2d 373 (1992) (same).
It follows from these authorities that, for the purposes of Chapter 6 of the Domestic Relations Code, the term "former spouse" is equated with "parent" when considering issues of child support.[2] OCGA § 19-6-19(d), therefore, authorizes an award of attorney fees to a prevailing party in a child support modification action, regardless of whether the child's parents were ever married. Accordingly, the trial court did not err in applying OCGA § 19-6-19(d) in this case.
2. Monroe contends the trial court erred in awarding attorney fees because Taylor's counterclaim for increased child support did not convert the custody modification action he initiated into a support modification action subject to OCGA § 19-6-19(d). But, "[i]nsofar as general rules of pleading are concerned, a counterclaim stands upon the same footing as an original claim." (Citation and punctuation omitted.) Raza v. Swiss Supply Direct, 256 Ga.App. 175, 178(2), 568 S.E.2d 102 (2002). See OCGA § 9-11-8(a)(2) (defining required elements for "any pleading which sets forth a claim for relief, whether an original claim, counterclaim, a cross-claim, or a third-party claim").
We are guided by the Supreme Court's explanation of OCGA § 19-6-22, which authorizes attorney fees to a party called upon to defend a petition under OCGA § 19-6-19 to modify alimony or child support, with no requirement that the defending party be the prevailing party. In Wright v. Wright, 246 Ga. 81, 83(2), 268 S.E.2d 666 (1980), the Supreme Court held, "[a] counterclaim is an application for purposes of [OCGA § 19-6-22, formerly] Code Ann. § 30-223[,] and will support a trial court's award of reasonable compensation for those attorney fees incurred solely in defense of the liable former spouse's counterclaim." (Citations omitted.) Similarly, we find no principled basis to distinguish, for purposes of OCGA § 19-6-19(d), between an action initiated by a support modification petition and a support modification claim added via a counterclaim to a pending custody action. See Haselden v. Haselden, 255 Ga. 366, 338 S.E.2d 257 (1986) (in dicta, Supreme Court noted that, although fees are not authorized where a party merely defends against a petition for change of custody, OCGA § 19-6-19(d) could authorize fees where a party responds to a petition to modify custody with a counterclaim for modification of support), modified on other grounds, McEachern v. McEachern, 260 Ga. 320, 322, 394 S.E.2d 92 (1990). Accordingly, the trial court did not err in applying OCGA § 19-6-19(d) in this case.
Judgment affirmed.
SMITH, C.J., and ELDRIDGE, J., concur.
NOTES
[1]  The relevant portions of OCGA § 19-6-19 provide as follows:

(a) ... The judgment of a court providing permanent alimony for the support of a child or children ... shall be subject to revision upon petition filed by either former spouse showing a change in the income and financial status of either former spouse or in the needs of the child or children .... (d) In proceedings for the modification of alimony for the support of a spouse or child pursuant to the provisions of this Code section, the court may award attorneys' fees, costs, and expenses of litigation to the prevailing party as the interests of justice may require.
[2]  Cf. Suarez v. Halbert, 246 Ga.App. at 824(1), 543 S.E.2d 733 (holding OCGA § 19-6-2, providing for attorney fees in actions for "alimony, divorce and alimony, or contempt of court arising out of ... orders involving property division, child custody, and child visitation rights," is limited to litigation between former spouses).
