
442 S.W.2d 198 (1969)
Paul SHICK, Appellant,
v.
Ben DEARMORE, Appellee.
No. 5-4894.
Supreme Court of Arkansas.
June 9, 1969.
As Amended on Denial of Rehearing July 14, 1969.
Thomas B. Tinnon, Mt. Home, for appellant.
Roy E. Danuser, Mt. Home, for appellee.
GEORGE ROSE SMITH, Justice.
In 1967 the appellee, Ben Dearmore, sold a vacant residential lot to Norbert Nelson, who was to pay for the lot in monthly installments over a period of two years. *199 Nelson took possession of the lot by moving a trailer house to it and began the construction of a permanent dwelling house on the land. Nelson employed the appellant, a well driller, to drill a water well on the property. Shick successfully completed a well by drilling to a depth of 284 feet and installing 191 feet of pipe. Nelson ran out of money without having paid Dearmore for the lot or Shick for the water well. Nelson abandoned the project and apparently left the state, his whereabouts thereafter being unknown.
Later on it was learned that Nelson and Shick had made a mistake in locating the well, which was actually drilled at a point a few inches past Nelson's boundary line and upon an adjoining lot also owned by Dearmore. When Shick threatened to assert a well-driller's lien against the lot, Dearmore brought this suit in equity to enjoin Shick from either claiming a lien or destroying the well. By counterclaim Shick asserted that Nelson had acted as Dearmore's agent in employing Shick to drill the well. Shick asked that he be given judgment against Dearmore for the contract price of $992, that the judgment be declared a lien upon the land, that the lien be foreclosed, and that Shick have such other relief as he might be entitled to.
At the trial Shick, not having Nelson as a witness, was unable to prove the asserted agency. Dearmore testified that Nelson had not been authorized by Dearmore to contract for the well and that Dearmore knew nothing about the drilling until the well had been completed. At the end of the trial the chancellor apparently ruled in Dearmore's favor but went on to say that Schick might remove the pipe and restore the land as nearly as possible to its original condition. Upon objection, however, the court invited briefs on the question and later rendered a decree holding that the casing installed in the well was a permanent improvement that became part of the realty; so Schick had no right to remove it. This appeal is from that decree.
Dearmore first insists that Shick has no standing in this court to seek the return of the pipe, because he did not pray for that relief in his counterclaim. There is no merit in that contention. In Grytbak v. Grytbak, 216 Ark. 674, 227 S.W.2d 633 (1950), we considered on rehearing just such a contention  that an issue had not been before the trial court because it was not raised by the prayer for relief. In denying the contention we said: "We have held that the statement of facts in a complaint or cross-complaint, and not the prayer for relief, constitutes the cause of action, and that the court may grant whatever relief the facts pleaded and proved may warrant, in the absence of surprise to the complaining party. Albersen v. Klanke, 177 Ark. 288, 6 S.W.2d 292. We conclude that the facts pleaded and proved warrant the allowance of alimony, and that appellee is not in a position to plead surprise."
So in the case at bar. Shick's counterclaim pleaded his contract with Nelson and the ensuing completion of the well; so Dearmore could not have been surprised by the proof. Shick failed, however, to prove that Dearmore had authorized the drilling of the well. Hence the question on appeal is whether, upon the facts actually pleaded and proved, Shick is entitled to remove the casing that he installed on Dearmore's land in good faith but by mistake.
We are convinced that in a court of equity Shick should be given the right to remove the casing and restore the land to its original condition, if that can be done without damaging the land. Any other holding would allow Dearmore to be unjustly enriched by obtaining a flowing water well to which he has no equitable claim.
The chancellor followed the strict common-law rule in holding that a permanent improvement placed upon another's land by mistake becomes a part of the realty and cannot be removed. Such a rule is obviously unjust when the improvement can be removed without damage to the freehold. Justice Joseph Story, while trying a *200 case in Maine as circuit justice, first pointed out the inequities of the common-law rule and refused to follow it in a proceeding in equity. His language, often quoted since, appears in his opinion in Bright v. Boyd, 4 Fed.Cas. p. 127 (No. 1,875) (C.C. Me.1841):
Take the case of a vacant lot in a city, where a bona fide purchaser builds a house thereon, enhancing the value of the estate to ten times the original value of the land, under a title apparently perfect and complete; is it reasonable or just, that in such a case, the true owner should recover and possess the whole, without any compensation whatever to the bona fide purchaser? To me, it seems manifestly unjust and inequitable, thus to appropriate to one man the property and money of another, who is in no default? The argument, I am aware, is, that the moment the house is built, it belongs to the owner of the land by mere operation of law; and that he may certainly possess and enjoy his own. But this is merely stating the technical rule of law, by which the true owner seeks to hold, what in a just sense, he never had the slightest title to, that is, the house. It is not answering the objection; but merely and dryly stating, that the law so holds. But, then, admitting this to be so, does it not furnish a strong ground why equity should interpose and grant relief?
Among the many cases that have adopted Justice Story's view we may mention Union Hall Ass'n v. Morrison, 39 Md. 281 (1873); Hardy v. Burroughs, 251 Mich. 578, 232 N.W. 200 (1930); Hatcher v. Briggs, 6 Or. 31 (1876); Herring v. Pollard, 23 Tenn. (4 Humph.) 362 (1843); Murphy v. Benson, 245 S.W. 249 (Tex. Civ. App. 1922).
When the Restatement of Restitution was published in 1937 the American Law Institute took the position in § 42 that the harshness of the common-law rule had been mitigated in most states at least to the extent of allowing restitution as a defense or set-off to affirmative relief sought by the landowner. Since then the steady trend of the decisions has been to allow the removal of the improvements in an equitable proceeding whenever that course can be followed without substantial damage to the land. A typical statement of the modern view was made three years ago by the South Carolina Court in Citizens & Southern Nat. Bank v. Modern Homes Const. Co., 248 S.C. 130, 149 S.E.2d 326 (1966):
While common law principles strongly affected our earlier decisions in dealing with the rights of one who improved the land of another, there is no sound reason to deny the plaintiff a remedy in equity under the facts alleged. If the plaintiff is allowed to remove the building, the defendant would be deprived of nothing to which he is justly entitled and would be compensated for any damage that might result from the removal of the building. Both parties would be made whole. It would be clearly inequitable, under the facts alleged, to allow the defendant to be enriched by the construction of the building on its land. Courts in other jurisdictions have found no difficulty in granting relief in such cases, not upon the theory of the betterment statutes, but upon the broad power of equity. See: Salazar v. Garzia, Tex.Civ. App., 232 S.W.2d 685; Toalson v. Madison, Mo. [App.], 307 S.W.2d 32; Hardy v. Burroughs, 251 Mich. 578, 232 N.W. 200; Murphy v. Benson, Tex.Civ.App., 245 S.W. 249; Pull v. Barnes, 142 Colo. 272, 350 P.2d 828.
We are so strongly in favor of the equitable view that has been taken more and more widely in the past several decades that we have no hesitancy in adopting it in the case at hand. Thus the chancellor's immediate reaction at the close of the proof was right  that Shick should be allowed to remove his casing and restore the land to its original condition. It is not entirely clear, however, that such a course *201 can be followed without damage to the land that might fairly be considered to be substantial when compared to the pecuniary loss that Shick would otherwise sustain. Pursuant to our discretionary power to remand a chancery case for further proof, General Box Co. v. Scurlock, 224 Ark. 266, 272 S.W.2d 678 (1954), we think it best to remand this cause to give the parties an opportunity to develop the proof upon the point mentioned, with leave to the chancellor to dispose of the matter by an award according to the principles of equity.
Reversed and remanded.
HARRIS, C. J., and FOGLEMAN, J., dissent.
FOGLEMAN, Justice (dissenting).
I respectfully dissent. The majority opinion, based upon the chancellor's finding that this fixture is a permanent improvement, allows appellant to come upon the land and reclaim it. However, equitable this result may seem in this case, it amounts to an overruling of a long standing rule of property, i. e., that permanent fixtures become part of the realty and belong to the owner thereof. See Ozark v. Adams, 73 Ark. 227, 83 S.W. 920. We have held on several occasions, upon a finding that the fixture was a permanent improvement, that it cannot be removed from the land because it has become a part of the realty. DePriest v. Peikert, 211 Ark. 460, 200 S.W.2d 804; Dent v. Bowers, 166 Ark. 418, 265 S.W. 636, 36 A.L.R. 443; Waldo Fertilizer Works, Inc. v. Dickens, 206 Ark. 747, 177 S.W.2d 398.
The cases cited by the majority, except one, all involve situations where equity has granted some sort of remunerative relief to a person who has mistakenly placed a permanent improvement on another's property. They are not support for the relief granted by the court here. Admittedly Citizens & Southern Nat. Bank v. Modern Homes Const. Co., 248 S.C. 130, 149 S.E.2d 326 (1966) allows the removal of improvements where it can be done without substantial damage to the land, but the short answer to this is that it is not the law in Arkansas. In Wallace v. Snow, 197 Ark. 632, 124 S. W.2d 209, we said, "It is further argued that the court should have allowed him judgment for improvements. In Marlow v. Adams, 24 Ark. 109, it was held that a party in possession of lands, who fails to establish his title thereto, cannot be allowed for improvements more than the value of the rents. And in McDonald v. Rankin, 92 Ark. 173, 122 S.W. 88, it was held that at common law the true owner had a right to improvements placed thereon even by a bona fide possessor; but that equity adopted the doctrine requiring the value of permanent improvements placed by a bona fide possessor to be off-set against the rents and profits, whenever the true owner applied to equity for an accounting by the possessor of the rents and profits. In this case there is no demand by appellees for rents and profits, and appellant cannot recover for his improvements. Not having color of title to the disputed strip of land he cannot claim under the betterment statute, Sec. 4658, Pope's Digest. See also, Foltz v. Alford, 102 Ark. 191, 143 S.W. 905, Ann.Cas.1914A, 236." (Emphasis mine.) I am unable to distinguish the Wallace case from the case at bar. See also Buswell v. Hadfield, 202 Ark. 200, 149 S.W.2d 555.
If it were the rule in Arkansas that the relief the majority would afford could be successfully asserted against a suit for equitable relief it should have been applied in DePriest v. Peikert, supra; Dent v. Bowers, supra; Wallace v. Snow, supra, where the claim was asserted in such an action.
HARRIS, C. J., joins in this dissent.
