
799 S.W.2d 524 (1990)
303 Ark. 630
Ray PRYOR and Stefanie PRYOR, Petitioners,
v.
HOT SPRING COUNTY CHANCERY COURT and Honorable Robert W. Garrett, Chancellor, and George Raper and Mildred Raper, Respondents.
No. 90-141.
Supreme Court of Arkansas.
November 19, 1990.
*525 G. Christopher Walthall, Malvern, for petitioners.
George Hopkins, Malvern, for respondents.
HOLT, Chief Justice.
This case comes to us on petition for a writ of prohibition. Petitioners, Ray and Stefanie Pryor (Pryors) seek to prevent the Chancery Court of Hot Spring County from hearing a cause of action they claim is barred by res judicata and lack of subject matter jurisdiction. We must deny the petition.
This case has a long history of litigation. Initially, respondents, George and Mildred Raper (Rapers), were awarded a strip of land located in Hot Spring County by adverse possession. The land, awarded by the circuit court of Saline County, overlapped the property line separating the Rapers from the Pryors. The parties stipulated that the current line separating the two properties was the same as the Hot Spring/Saline County and section line, upon which a fence had been erected by the Pryors. The circuit court found, however, that the Rapers had adversely acquired property south of the Pryors' fence which included a drive way and part of a garden plot. No exact dimensions of the adversely held property were offered at trial and the court ordered the dimensions to be determined by a registered land surveyor. The original order was twice amended to include the land description; however, both orders were erroneous and described land north, rather the south, of the original property line.
The Pryors appealed from the circuit court's orders to the Arkansas Court of Appeals, which affirmed. The Pryors' petition for rehearing, based on the appellate court's failure to take corrective action on the erroneous land description in the supplemental orders, was denied. Our court denied the Pryors' petition for certiorari.
Claiming that a cloud existed on their title, the Pryors then filed a petition to Quiet Title in the Hot Spring County Chancery Court. The chancery court dismissed the cause of action, agreeing with the Rapers that the matter was barred by res judicata.
The Pryors returned to the circuit court of Saline County and petitioned it to correct the cloud created by its misdescription. For the first time, the Rapers conceded that the orders contained inaccurate descriptions of the property. The circuit court recognized the error in the supplemental orders but determined that it was without jurisdiction to redetermine or restructure the orders without agreement of both parties.
During this time frame, the Rapers were still using part of the strip of property as their driveway. The Pryors placed boulders on the property to prevent the Rapers from continuing their use of the driveway. As a result, the Rapers filed the present suit in the Hot Spring County Chancery Court requesting correction of the legal description of the property, an injunction requiring the Pryors to restore the driveway to its original condition, and damages in the amount of $1,000. The Pryors' motion to dismiss the petition was denied by the chancery court; hence this petition for writ of prohibition.
We have said many times that "prohibition is an extraordinary writ and is never issued to prohibit a trial court from erroneously exercising its jurisdiction, only where it is proposing to act in excess of its jurisdiction." Leach v. State, 303 Ark. 309, 312, 796 S.W.2d 837 (1990) (quoting Abernathy v. Patterson, 295 Ark. 551, 750 S.W.2d 406 (1988)).
The question of res judicata, the Pryors' first argument in support of their petition, is an affirmative defense to be raised in the trial court and does not *526 present a question of jurisdiction. See ARCP Rule 8(c); Ark. State Hwy. Comm'n v. Munson, 295 Ark. 447, 749 S.W.2d 317 (1988); Tucker Enterprises Inc. v. Hartje, 278 Ark. 320, 650 S.W.2d 559 (1983). We stated in Tucker, supra, that "it is not the office of the writ of prohibition to test the correctness of the trial court's ruling on the defense of res judicata." We further explained that:
If Prohibition may be used to test the sufficiency of a defense, there is no reason why it could not also be used to review the trial court's action in overruling a demurrer to the complaint. Of course that is not the office of the writ. Petitioner's question must be raised by appeal....
Id. (quoting Harris Distributors, Inc. v. Marlin, Judge, 220 Ark. 621, 249 S.W.2d 3 (1952)). The Pryors' avenue for challenging the chancery court's decision that res judicata does not bar the suit, lies on appeal, not by writ.
We arrive at the same conclusion concerning the Pryors' second contention that the chancery court lacks jurisdiction. Although it is well settled that this court has authority to prevent a trial court from proceeding in a matter wholly outside its jurisdiction, that is not the situation here. See Springdale School Dist. v. Jameson, 274 Ark. 78, 621 S.W.2d 860 (1981).
The Rapers ask for removal of the cloud on their title by correcting the misdescription of the property and for an injunction requiring the removal of the boulders, both forms of equitable relief appropriate under chancery jurisdiction. The issue of damages is then properly assumed under our long standing rule that once a chancery court acquires jurisdiction for one purpose, it may decide all other issues. See First Arkansas Leasing Corp. v. Munson, 282 Ark. 359, 668 S.W.2d 543 (1984). The Pryors argue, however, that equitable jurisdiction is not proper because the Rapers are not currently in possession of the property and therefore the action is, instead, an action for ejectment, a matter solely within the jurisdiction of the circuit court. See Liggett v. Church of Nazarene, 291 Ark. 298, 724 S.W.2d 170 (1987).
For purposes of a writ of prohibition, jurisdiction is tested on the pleadings and not the proof, and we do not decide if the allegations are true, only if the lower court is wholly without jurisdiction to hear them. Springdale v. Jameson, supra.
Here, the Rapers alleged, in their petition to the chancery court, that they were in possession of the disputed land and asked for equitable relief. The pleadings thus place the issue of possession in dispute and we have often held that no writ can be issued where there are contested facts. See Ellison v. Langston, 290 Ark. 238, 718 S.W.2d 446 (1986); Statewide Health v. Circuit Court of Pulaski County, 287 Ark. 84, 696 S.W.2d 729 (1985). We cannot say the Hot Spring Chancery Court was wholly without jurisdiction to hear this matter.
Petition for Writ of Prohibition denied.
