
614 P.2d 1083 (1980)
94 N.M. 634
William SHULTZ, Petitioner-Appellant,
v.
Pete PASCOE and Gwen Pascoe, his wife, Phil Stadtler and Lois Stadtler, his wife, and Dan J. Stadtler and Judy Stadtler, his wife, Respondents-Appellees.
No. 12552.
Supreme Court of New Mexico.
August 4, 1980.
Dickson & Young, Silver City, Geer, Handley & Hunt, Kenneth A. Hunt, Albuquerque, for petitioner-appellant.
J. Wayne Woodbury, Silver City, for respondents-appellees.

OPINION
FELTER, Justice.
Petitioner-appellant, William Shultz, brought suit against respondents-appellees, Pascoe, et al., for a temporary restraining order to enjoin the respondents from entering onto lands claimed by petitioners under a real estate contract and from interfering with the peaceable possession of such lands by petitioner. Subsequently the complaint of the petitioner was dismissed with prejudice and the trial court awarded respondents "damages" for their attorney fees in the sum of $898.95. We reverse the order of the trial court awarding damages for attorney fees to respondents.
The rights of petitioner to specific performance of the real estate contract for purchase of the land in question from respondents and to possession of that land were finally decided in favor of petitioner by judgment of the United States District Court for the District of New Mexico on October 24, 1978. Collateral to the principal relief sought by petitioner in the action in Federal Court, petitioner also sought relief by way of a temporary restraining order in State court which case has culminated in this appeal.
In addition to contesting and seeking the dismissal of the temporary restraining order in the case at bar, respondents also counterclaimed to have title to the real estate quieted in their name, claiming, in effect, a breach and forfeiture of the real estate contract by petitioner. No dispute exists about the amount of attorney fees paid by respondents to their attorney, namely $898.95, which included all services rendered in the lawsuit in the State court. Both petitioner and respondent moved to dismiss the case in State court. Petitioner also requested the return of the $1,000 cash bond furnished as a condition for the temporary restraining order.
*1084 The case of Webb v. Beal, 20 N.M. 218, 148 P. 487 (1915), cited by respondents in support of their position contains, inter alia, the following partial quotation from the case of Wittich v. O'Neal, 22 Fla. 592 (1886), with which this Court agreed, to wit:
"[I]f on investigation it is found that the plaintiff had no just right either in the law or the facts to justify him in asking and obtaining from the court such a harsh and drastic exercise of its authority, that he should indemnify the defendant in the language of his bond for `all damages he might sustain,' and that reasonable counsel fees necessary to the recovering of such injunction are properly a part of his damage."
20 N.M. at 223, 148 P. at 488.
The difficulty in finding the quoted language supportive of respondents' position is that while the temporary restraining order was dismissed and dissolved, we cannot say that petitioner had no right to seek the collateral relief afforded by the temporary restraining order, when in fact and "on investigation" it was found by the United States District Court that petitioner was entitled to possession and specific performance for purchase of the land. To say that petitioner, "had no just right either in the law or the facts to justify" his asking for a temporary restraining order, is to ignore the final decision of the United States District Court in favor of petitioner.
In the case of Woods v. Fambrough, 24 N.M. 488, 174 P. 996 (1918), cited by respondents, the Court held that the portion of the dissolved injunction relating to the grazing of livestock on public lands within four miles of the private lands of appellee was wrongfully issued. No such finding or factual situation exists in the case at bar. Indeed, the judgment of the United States District Court would indicate the right of the petitioner to peaceable possession of the lands in question and also to the relief collaterally asked of the State court by way of a temporary restraining order.
We find no New Mexico decision ruling upon the propriety of an award of damages by way of attorney fees to a respondent where, in a separate principal action the petitioner prevailed, but where on a collateral suit for an injunction a temporary restraining order was dismissed and discharged. In other jurisdictions it has been held that before attorney fees may be awarded to a party enjoined, it must be shown that such party was wrongfully enjoined. Unity Light & Power Co. v. City of Burley, 92 Idaho 499, 445 P.2d 720 (1968); Kelder v. Dale, 313 S.W.2d 59 (Mo. App. 1958). In Unity Light & Power Co. v. City of Burley, the Supreme Court of Idaho stated:
It is essential as a condition for an award of attorney's fees that the attorney's fees be incurred or suffered by the party found to be wrongfully enjoined.
445 P.2d at 723. (Emphasis added.)
We reiterate here that it was not the respondents but the petitioner who prevailed on the issues of right to exclusive possession and specific performance in federal court. The final decision on those principal issues shatters any claim by the respondents that the temporary restraining order may have "wrongfully" enjoined them from interfering with the petitioner's peaceable possession of the realty.
Even had the temporary restraining order been wrongfully issued (which is not the situation in this case), still respondents would not be entitled to all their attorney fees by way of damages. Part of such attorney fees were applicable to respondents' counterclaim and aspects of the case other than dismissal of the temporary restraining order. Where a person is wrongfully enjoined, he may recover only that portion of his counsel fees applicable to the restraint or injunction, but not for the other legal services involved in the litigation. Tatavich v. Pettine et al., 31 N.M. 479, 247 P. 840 (1926); Luker v. Perry, 351 So.2d 591 (Ala. Civ. App. 1977).
We hold that a party enjoined may recover damages for attorney fees only where a resolution of the principal or underlying issues is in favor of the party enjoined and the injunction is found to be *1085 wrongful. Where a party is entitled to damages for attorney fees because he was enjoined wrongfully, his damages are limited to that portion of his attorney fees in the lawsuit which is applicable only to the wrongful injunction or restraint.
The decision and judgment of the trial court awarding damages for attorney fees to respondents is reversed. This case is remanded to the trial court with instructions that judgment be entered for petitioner in conformity with this opinion.
IT IS SO ORDERED.
PAYNE and FEDERICI, JJ., concur.
