The appellee, Otto Y. Johnson, brought a complaint for modification of alimony on November 25, 1980. The appellant, Helen Ricks Johnson, filed her answer and sought attorney fees in connection with the defense of the action. A jury found in favor of the appellant, and she was awarded court costs and attorney fees. The appellee’s motion for new trial was granted; however, four years later, the appellee’s motion to dismiss was granted over the appellant’s objection.
The appellant contends that her answer and prayer for attorney fees and expenses of litigation sought affirmative relief, and as such the action should not have been dismissed. OCGA § 9-11-41. The appellee argues that the answer is not a counterclaim and therefore should not prevent dismissal.
The General Assembly has granted trial courts broad discretion *444in awarding attorney fees and the costs of litigation in alimony and divorce cases. OCGA § 19-6-2. The purpose of allowing attorney fees is to ensure effective representation of both spouses so that all issues can be fully and fairly resolved. Blanchet v. Blanchet, 251 Ga. 379, 380-81 (306 SE2d 907) (1983). The question, therefore, is not whether the prayer for attorney fees is a counterclaim, it is whether any attorney fees have been incurred. If there have been attorney fees incurred or awarded, then the dismissal of the action cannot divest the court of its discretion in awarding the fees or the party of any fees awarded. See Love v. Love, 251 Ga. 846 (310 SE2d 504) (1984).
Decided October 4, 1990.
Lissner, Killian & Cunningham, Robert P. Killian, for appellant.
Evelyn H. Johnson, for appellee.
Judgment reversed.
All the Justices concur.