
11 Cal.Rptr.3d 92 (2004)
116 Cal.App.4th 1084
Clark Ashley HARRISON, as Co-Trustee, etc., et al., Plaintiffs, Cross-Defendants and Respondents,
v.
Denese Gail WELCH, as Trustee, etc., Defendant, Cross-complainant and Appellant.
No. C044320
Court of Appeal, Third District.
March 12, 2004
*94 Kirsher, Winston & Boston and Robert D. Winston, Modesto, for Defendant, Cross-complainant and Appellant.
William L. Anderson, Stockton, for Plaintiffs, Cross-defendants and Respondents.
Certified For Partial Publication[*]
*93 ROBIE, J.
In 1994, defendant Denese Welch built a woodshed and placed some landscaping on her property that partially encroached on the vacant lot next door. When plaintiffs Clark and Dana Harrison purchased the vacant lot in 2001, they had the property line surveyed and discovered the encroachment. The Harrisons brought this action to quiet their title to the lot and to enjoin Welch's encroachment. In response, Welch sought to establish title to the encroachment area by adverse possession or a prescriptive easement to maintain the woodshed and the landscaping. She also *95 contended the Harrisons' suit was barred by the statute of limitations.
The trial court rejected Welch's claims to title by adverse possession and a prescriptive easement, but agreed the Harrisons were "time barred from obtaining a mandatory injunction requiring the immediate removal of the encroachments." Nevertheless, the trial court determined it could grant equitable relief to the Harrisons based on Welch's claim for equitable relief in her cross-complaint. The court determined the trees planted on the Harrisons' property belonged to the Harrisons, and although the court allowed Welch to keep a buried sprinkler line in the encroachment area, it directed her to remove the rest of the landscaping and the woodshed from the Harrisons' property.
On appeal, Welch contends the trial court erred in rejecting her claim to a prescriptive easement to maintain the woodshed and the landscaping on the Harrisons' property. She also contends the trial court erred in granting the Harrisons' injunctive relief against her encroachments despite finding their claim for such relief was barred by the statute of limitations.
We conclude the trial court did not err in rejecting Welch's claim to a prescriptive easement.[1] We further conclude the trial court was wrong when it determined the Harrisons' claim for injunctive relief was barred by the three-year limitations period in Code of Civil Procedure[2] section 338. In seeking to enjoin Welch's encroachment on their property, the Harrisons were seeking to recover possession of their property from Welch. Accordingly, their claim for injunctive relief was subject to the five-year limitations period in sections 318 and 321, not the three-year period in section 338. Furthermore, the five-year limitations period for an action to recover real property does not expire unless and until the encroacher's use of the property ripens into either title by adverse possession or a prescriptive easement. Here, since Welch's encroachment did not ripen into either, the Harrisons' request to enjoin the encroachment was not time-barred. The trial court's erroneous conclusion to the contrary was harmless, however, because the trial court nonetheless exercised its equitable power to enjoin the encroachment through the vehicle of Welch's cross-complaint. Accordingly, we will affirm the judgment.

FACTUAL AND PROCEDURAL BACKGROUND
Welch purchased lot 7 in the Shasta Holiday subdivision in Siskiyou County in 1980.[3] At the time, the lot had a house on it that a contractor had built the year before as a "spec" house. The adjacent property to the south, lot 8, was vacant and remained vacant through the trial in this matter.
In 1985, Welch planted a "Christmas tree" (which she calls Stanford) near the southwest corner of her property. As it turned out, she planted the tree across the property line, on lot 8.
Around 1994, Welch built a woodshed made of railroad ties and plywood behind the tree she had planted in 1985. Welch *96 also installed some railroad tie planter boxes along the south side of the property and planted a row of trees in the boxes. The trees are irrigated by a soaker hose, and part of Welch's sprinkler system lies underground in the same area.[4] Before installing these improvements in 1994, Welch made some effort to locate the boundary between her lot and lot 8, but failed to ascertain the true boundary. As a result, unbeknownst to Welch, the woodshed and the landscaping partially encroached on lot 8.
The Harrisons purchased lot 8 in March 2001. At the time of the purchase, the Harrisons were aware of a possible encroachment problem, but they did not know the extent of the encroachment. In June 2001, the Harrisons had the property surveyed. The survey revealed that the woodshed encroached up to 7.25 feet onto their lot and the landscaping encroached up to 9.8 feet. The total area of the encroachment amounted to 8 percent of the lot.
In December 2001, the Harrisons commenced this action against Welch. In an amended complaint filed in January 2002, the Harrisons sought to quiet their title to lot 8 and sought equitable relief requiring Welch to remove the encroachments, as well as damages for the encroachment. In response, Welch filed an answer alleging various affirmative defenses, including the statute of limitations. Welch also filed a cross-complaint against the Harrisons, seeking "to establish [her] legal right ... to fee title or some other interest, as well as exclusive use and occup[anc]y of the land" on which the encroachments were built. Welch asserted various theories in support of her cross-complaint, including adverse possession, prescriptive easement, and the balancing of the hardships.
The case was tried to the court in January 2003. Following the receipt of testimony and a view of the property, the court issued a written ruling. The court determined the Harrisons had proven their right to quiet title to lot 8, "unless that result is undermined by one of Welch's contentions." The court then concluded Welch was not entitled to title by adverse possession because she had not paid taxes on the area of the encroachments. With respect to her claim for a prescriptive easement, the court found Welch had proven the elements of such a claim; however, the court concluded California law does not allow exclusive prescriptive easements, and Welch's encroachments were "properly characterized as an exclusive use of the encroachment area."
The trial court went on to determine that the encroachments were permanent in nature and therefore the Harrisons were barred by the three-year statute of limitations in section 338 from obtaining a mandatory injunction requiring Welch to remove them. Nevertheless, the court concluded it could engage in "an equitable balancing of hardships ... through Welch's request for equitable relief." "[W]eighing all of the relevant factors such as the relative innocence/good faith of the parties, relative hardships, etc.," the court determined:
1) The trees planted on lot 8 belonged to the Harrisons;
2) Welch could remove the encroaching planter boxes by the end of May 2003, and if she failed to do so by then the Harrisons could do whatever they wanted with them;
*97  3) Welch could remove the woodshed from the encroachment area by the first of July 2003, and if she failed to do so by then the Harrisons could do so; and
4) The buried irrigation lines installed by Welch for her lawn could remain in place, although any sprinkler heads encroaching on the Harrisons' lot had to be capped unless the Harrisons allowed them to remain in place.
A judgment consistent with the court's written ruling was entered in April 2003, and Welch filed a timely notice of appeal from that judgment.

DISCUSSION

I


Adverse Possession[**]

II

Prescriptive Easement
Welch contends the trial court erred in not granting her an exclusive prescriptive easement to maintain the woodshed and a nonexclusive prescriptive easement for "the continued use and maintenance of the trees, planter boxes, irrigation lines, and encompassing lands." We find no error in the trial court's ruling.
"To establish the elements of a prescriptive easement, the claimant must prove use of the property, for the statutory period of five years, which use has been (1) open and notorious; (2) continuous and uninterrupted; (3) hostile to the true owner; and (4) under claim of right." (Mehdizadeh v. Mincer (1996) 46 Cal.App.4th 1296, 1305, 54 Cal.Rptr.2d 284.)
Here, the trial court found Welch had "proven the elements [of a prescriptive easement] with respect to the encroachment." Nevertheless, the court refused to grant her such an easement because, according to the court, "a prescriptive easement cannot be based on an exclusive use of the area in question, and under California law the encroachments in this case are properly characterized as an exclusive use of the encroachment area, not a non-exclusive use."
Welch's attack on the trial court's conclusion is two-fold. With respect to the woodshed, Welch contends there is no authority that prevents an exclusive prescriptive easement from being granted for a "substantial building" structure. With respect to the landscaping, Welch acknowledges that under recent case law, "the ability of a court to grant an exclusive-use prescriptive easement to, in effect, extend a residential yard has largely been negated." She argues, however, that she "is not seeking an exclusive easement, but only a non-exclusive one."
In analyzing Welch's arguments, four cases are particularly relevant to our inquiry. In the first case  Raab v. Casper (1975) 51 Cal.App.3d 866, 124 Cal.Rptr. 590  part of the "driveway, utility lines, yard and landscaping" surrounding the defendants' home was built on the plaintiffs' land. (Id. at pp. 870, 876, 124 Cal.Rptr. 590.) When the plaintiffs sought a mandatory injunction and damages approximately 10 years later, the trial court concluded the "defendants had acquired by prescription an `easement' covering their driveway, utility lines and yard." (Ibid.)
On the plaintiffs' appeal, this court reversed the judgment, concluding the defendants could not acquire a prescriptive easement to maintain part of their yard on the plaintiffs' property. The court explained "[t]here is a difference between a prescriptive use of land culminating in an easement (i.e., an incorporeal interest) and *98 adverse possession which creates a change in title or ownership (i.e., a corporeal interest); the former deals with the use of land, the other with possession; ..." (Raab v. Casper, supra, 51 Cal.App.3d at p. 876, 124 Cal.Rptr. 590.) The court continued: "An exclusive interest labeled `easement' may be so comprehensive as to supply the equivalent of an estate, i.e., ownership. In determining whether a conveyance creates an easement or estate, it is important to observe the extent to which the conveyance limits the uses available to the grantor; an estate entitles the owner to the exclusive occupation of a portion of the earth's surface.... [¶] In this case defendants had installed on plaintiff's side of the common boundary not only utility lines and part of the driveway to their home, but also part of their yard and landscaping. The judgment declares that defendants are entitled to an easement for roadway and utility lines `together with an easement for the maintenance of lawn, fences, shrubs, fruit trees, and landscaping around the CASPER house....' Although adroitly phrased to avoid the language of a grant of title, the last-quoted clause was undoubtedly designed to give defendants unlimited use of the yard around their home. Defendants doubtless did not intend plaintiffs, owners of the nominal servient tenement, to picnic, camp or dig a well in their yard. They doubtless did not intend to own a house on one side of the boundary with an unmarketable yard on the other. The findings and judgment were designed to exclude plaintiffs from defendants' domestic establishment, employing the nomenclature of easement but designed to create the practical equivalent of an estate. [¶] Achievement of that objective required proof and findings of the elements of adverse possession, not prescriptive use." (Id. at pp. 876-877, 124 Cal.Rptr. 590.) Accordingly, this court reversed the judgment, directing the trial court on remand to "give separate consideration to the yard and landscaping as distinguished from the easements for driveway and utility lines." (Id. at p. 878, 124 Cal.Rptr. 590.)
Sixteen years later, the issue of an exclusive prescriptive easement arose again in Otay Water Dist. v. Beckwith (1991) 1 Cal.App.4th 1041, 3 Cal.Rptr.2d 223. In that case, the trial court granted the plaintiff (Otay) an exclusive prescriptive easement to maintain a reservoir that had been maintained on part of the defendants' property for more than 20 years. (Id. at pp. 1044-1045, 3 Cal.Rptr.2d 223.) On appeal, one of the defendants (Beckwith) contended the trial court had "erred in granting Otay an exclusive easement because a prescriptive easement, by definition, cannot be exclusive." (Id. at p. 1047, 3 Cal.Rptr.2d 223.) The appellate court disagreed, noting that "while an exclusive easement `is an unusual interest in land' [citation], where, as here, the use during the statutory period was exclusive, a court may properly determine the future use of the prescriptive easement may continue to be exclusive." (Ibid.) The court explained that an exclusive easement was "particularly justified on this record where Otay submitted uncontested evidence showing Beckwith's proposed recreational use would unreasonably interfere with Otay's right to continue operating a reservoir. Otay established its exclusive use is necessary to prevent potential contamination of the water supply and for other health and safety purposes." (Id. at pp. 1047-1048, 3 Cal.Rptr.2d 223.)
Five years later, in Silacci v. Abramson (1996) 45 Cal.App.4th 558, 53 Cal.Rptr.2d 37, the appellate court addressed the creation of an exclusive prescriptive easement in "a dispute between neighbors over use and ownership of a portion of land behind their houses." (Id. at p. 560, 53 Cal. *99 Rptr. 2d 37.) In Silacci, the trial court granted the Abramsons an exclusive prescriptive easement over 1,600 square feet of the Silaccis' property which the Abramsons had "fenced in and used as a backyard," restricting use of the easement "to a backyard garden area." (Id. at pp. 560-561, 53 Cal.Rptr.2d 37.) Finding guidance in Raab, the appellate court reversed. (Id. at p. 562, 53 Cal.Rptr.2d 37.) The court distinguished the Otay Water Dist. case, explaining that it "must be limited to its difficult and peculiar facts. A public water company's right to keep drinking water safe from contamination must be given precedence. An exclusive prescriptive easement is, nonetheless, a very unusual interest in land. The notion of an exclusive prescriptive easement, which as a practical matter completely prohibits the true owner from using his land, has no application to a simple backyard dispute like this one. An easement, after all, is merely the right to use the land of another for a specific purpose  most often, the right to cross the land of another. An easement acquired by prescription is one acquired by adverse use for a certain period. An easement, however, is not an ownership interest, and certainly does not amount to a fee simple estate. To permit Abramson to acquire possession of Silacci's land, and to call the acquisition an exclusive prescriptive easement, perverts the classical distinction in real property law between ownership and use. The trial court's order here amounted to giving Silacci's land completely, without reservation, to Abramson. This the court did, using the term `exclusive prescriptive easement,' an unusual doctrine which does not apply." (Id. at p. 564, 53 Cal.Rptr.2d 37.)
Little more than a month after the Silacci decision, another appellate court reached the same result under similar facts in Mehdizadeh v. Mincer, supra, 46 Cal.App.4th 1296, 54 Cal.Rptr.2d 284. In that case, the trial court granted the plaintiff a prescriptive easement for "landscaping and recreation" purposes over a 10-foot-wide strip of the defendants' property that had been fenced as part of the plaintiff's property. (Id. at pp. 1300-1302, 54 Cal.Rptr.2d 284.) The appellate court reversed, noting "[t]he prescriptive easement granted by the trial court ... would divest the Mincers of nearly all rights that owners customarily have in residential property. A fence will bar the Mincers' access to the property, and they cannot build on, cultivate, or otherwise use it. Mehdizadeh cannot build on it either, but otherwise his right to `use' looks more like `occupancy,' possession, and ownership." (Id. at pp. 1305-1306, 54 Cal.Rptr.2d 284.) Like the Silacci court, the Mehdizadeh court relied on Raab and distinguished Otay Water Dist. as a case involving a "public health [and] safety basis for granting an exclusive [prescriptive] easement." (Id. at pp. 1306-1307, 54 Cal.Rptr.2d 284.)
From the foregoing cases, we discern the rule that an exclusive prescriptive easement, "which as a practical matter completely prohibits the true owner from using his land" (Silacci v. Abramson, supra, 45 Cal.App.4th at p. 564, 53 Cal.Rptr.2d 37), will not be granted in a case (like this) involving a garden-variety residential boundary encroachment.[5] The *100 question remains, however, whether granting Welch an easement for either (or both) of her encroachments  the woodshed and the landscaping  would create such a forbidden easement.
We begin with Welch's claim to an easement to maintain the woodshed. The shed is constructed of railroad ties sunk into the ground, with a roof made of plywood and shingles. Welch herself acknowledges that "[i]f [the shed] is to continue in existence, [she] must be granted an exclusive right to use the land lying under it." Under Raab, Silacci, and Mehdizadeh, however, Welch cannot be granted an easement that effectively excludes the Harrisons from any use of that portion of their property on which the woodshed stands.
Welch contends none of those cases "dealt with substantial building structures," but that is a distinction without a difference. An encroaching woodshed, just as much as any encroaching fenced-in landscaping, "as a practical matter completely prohibits the true owner from using his land." (Silacci v. Abramson, supra, 45 Cal.App.4th at p. 564, 53 Cal.Rptr.2d 37.) Thus, the rationale of Raab, Silacci, and Mehdizadeh supports the trial court's decision to deny Welch a prescriptive easement for the woodshed.[6]
With respect to the landscaping, Welch concedes she is not entitled to an exclusive easement, but claims she is not seeking one. She contends the use she is making of that portion of the Harrisons' property on which her landscaping lies is not exclusive because there are no "physical" or "practical" barriers excluding the Harrisons from the landscaped area, as there were in Silacci and Mehdizadeh. Welch recognizes that no such barrier was present in Raab, but nonetheless attempts to distinguish that case on the ground that the area on which her landscaping is located  at least to the extent that area is within five feet of either side of the property line  is "the area which is traditionally used as a shared buffer between residences, and the use of which is not claimed exclusively by either property owner."
We disagree that the location of Welch's landscaping within the setback area along the property line provides a valid basis for distinguishing this case from Raab. That under the subdivision restrictions and the local zoning ordinance neither party may lawfully erect a dwelling or residence within five feet of the property line does not mean either owner is deprived of the right to determine what other use to make of the setback area on his or her property consistent with that limitation. Here, however, Welch's landscaping effectively prevents the Harrisons from determining how the area of the encroachment is to be used.
As the trial court here thoughtfully explained: "Granted the planter boxes and trees are arguably an attractive border for both lots and [the] Harrisons are not physically excluded from those portions of the encroachment area, but such facts do not *101 make the encroaching use any less exclusive. It is the exclusivity of the use of the surface of the land in the encroachment area that is determinative, and the landscaping scheme of Welch has essentially co-opted the encroachment area to an exclusive use designed by Welch."
From what we can discern from the photographs in the record, the trial court was more than justified in concluding that, as a practical matter, Welch's installation of trees, railroad tie planter boxes, and an irrigation system on the Harrisons' property "completely prohibits the [Harrisons] from using [that part of their] land." (Silacci v. Abramson, supra, 45 Cal.App.4th at p. 564, 53 Cal.Rptr.2d 37.) They cannot put in a driveway on that portion of their lot or use it to run their utility lines, as they had planned to do. They cannot install a fence along the boundary line  a use that even Welch acknowledges is common in "the area between two adjacent homes in close proximity." Nor can they use this portion of their property for any other practical purpose. Welch contends the Harrisons "could, indeed, picnic, camp, dig a well, and undertake any number of other activities on the land"; however, she fails to point to any evidence in the record that reasonably supports that contention.
Because of the exclusive nature of the uses Welch was making of the encroachment area, the trial court did not err in refusing to grant Welch a prescriptive easement to maintain the woodshed and the landscaping on the Harrisons' property.

III

Statute Of Limitations
Welch's final argument is that the trial court "erred by decreeing the forfeiture or removal of [her] improvements, even while recognizing that any injunctive relief in favor of [the Harrisons] was time-barred." The Harrisons contend that, notwithstanding the trial court's conclusion, their claim for injunctive relief was not time-barred, and therefore the relief the trial court granted was proper. We agree with the Harrisons.
Section 312 provides that "[c]ivil actions, without exception, can only be commenced within the periods prescribed in this title, after the cause of action shall have accrued, unless where, in special cases, a different limitation is prescribed by statute." The limitation periods for actions to recover real property are set out in sections 315 through 330. The limitation periods "for the commencement of actions other than for the recovery of real property" are set out in section 335.1 et seq. (§ 335.)
The basic limitations period for bringing an action to recover real property is prescribed by section 318, which provides: "No action for the recovery of real property, or for the recovery of the possession thereof, can be maintained, unless it appear that the plaintiff, his ancestor, predecessor, or grantor, was seized or possessed of the property in question, within five years before the commencement of the action." This statute must be read in conjunction with section 321 (Schoenfeld v. Pritzker (1967) 257 Cal.App.2d 117, 123, 64 Cal.Rptr. 592), which provides: "In every action for the recovery of real property, or the possession thereof, the person establishing a legal title to the property is presumed to have been possessed thereof within the time required by law, and the occupation of the property by any other person is deemed to have been under and in subordination to the legal title, unless it appear that the property has been held and possessed adversely to such legal title, for five years before the commencement of the action." (§ 321.) Thus, "`[s]ection 321 *102 ... establishes the presumption of possession in the legal owner, unless such presumption is rebutted by the actual adverse possession ... of another; ...'" (Schoenfeld, at p. 123, 64 Cal.Rptr. 592.)
What this means is that once the Harrisons established their legal title to lot 8 by offering into evidence their deed to the property, they were entitled to pursue an action to recover possession of their property from Welch unless Welch showed she had been in adverse possession of the disputed portion of lot 8 for five years prior to the filing of the Harrisons' complaint. In other words, the running of the five-year limitations period for bringing an action to recover real property is the same as the five-year period of use and occupancy required to establish either title by adverse possession or a prescriptive easement. (See Welsher v. Glickman (1969) 272 Cal.App.2d 134, 137, 77 Cal.Rptr. 141.) As one court has written with respect to a claim of title by adverse possession, "to start the statute to running against the legal owner of the land, there must be an avowed claim of ownership by the party relying upon the statute and substantially all the elements essential to the establishment of title by adverse possession shown to exist." (Wood v. Henley (1928) 88 Cal.App. 441, 460, 263 P. 870, italics added.) The same rule applies to a claim of a prescriptive easement. (See Welsher v. Glickman, supra, 272 Cal.App.2d at p. 137, 77 Cal.Rptr. 141.) Thus, unless and until the encroacher's use of the property ripens into title by adverse possession or a valid prescriptive easement, the legal title holder's right to bring an action to recover his or her property from the encroacher never expires. This must be so, "otherwise, the record owner would be unable to recover possession, and a possessor would be unable to establish title" or a prescriptive easement. (Schoenfeld v. Pritzker, supra, 257 Cal.App.2d at p. 122, 64 Cal.Rptr. 592.)
With the law thus properly understood, it follows that because Welch's encroachment on the Harrisons' property never ripened into either title by adverse possession or a prescriptive easement (for reasons we have previously explained), the limitations period for the Harrisons to bring an action to recover their property from Welch had not expired when they filed their complaint in December 2001, even though Welch had been encroaching on their property for more than seven years. Thus, the trial court was not barred by the statute of limitations from granting the Harrisons the injunctive relief they sought  requiring Welch to "remove the ... encroachments and restore possession of the portions of lot 8 occupied by [the] encroachments" to the Harrisons.
In erroneously determining the Harrisons' request for injunctive relief was time-barred, the trial court followed a number of appellate court decisions holding that an action for a mandatory injunction seeking to enjoin a permanent encroachment must be instituted within three years from the inception of the encroachment. (JA 91-93) (See, e.g., Field-Escandon v. DeMann (1988) 204 Cal.App.3d 228, 233, 251 Cal.Rptr. 49; Troeger v. Fink (1958) 166 Cal.App.2d 22, 26-27, 332 P.2d 779; 6 Miller & Starr, Cal. Real Estate (3d ed.2000) § 14:14, p. 40, fn. 3 [citing other cases].) Those cases rely on subdivision (b) of section 338, which provides that the limitations period for "[a]n action for trespass upon or injury to real property" is three years. The flaw in those cases is that an action seeking to enjoin a permanent encroachment is properly characterized as an action for the recovery of real property subject to the five-year limitation period in sections 318 and 321, rather than as an action for trespass *103 subject to the three-year limitation period in section 338, subdivision (b).
This error can perhaps be traced to a misunderstanding of our Supreme Court's decision nearly 100 years ago in Williams v. Southern Pacific R.R. Co. (1907) 150 Cal. 624, 89 P. 599. In that case, the defendant had laid railroad track and was operating a railroad on land owned by the plaintiff and had been doing so for more than three years before the plaintiff filed his complaint.[7] (Id. at p. 625, 89 P. 599.) The plaintiff claimed the railroad had diminished the value of his property in the sum of $600, and his complaint asked for $600 in damages or a permanent injunction enjoining the operation of the railroad. (Ibid.)
On appeal from a judgment in favor of the defendant following the sustaining of a demurrer, the Supreme Court held the plaintiff's claim for damages from what amounted to a permanent trespass was barred by the three-year limitations period in section 338. (Williams v. Southern Pacific R.R. Co., supra, 150 Cal. at pp. 625-628, 89 P. 599.) The court then went on to hold that the plaintiff's request for an injunction did not change the result, explaining that "[t]he provisions of our code relative to limitation of actions make no distinction between equitable and legal proceedings." (Id. at p. 628, 89 P. 599.) In closing, the court wrote: "No doubt the prayer of a complaint will in many cases be of assistance in ascertaining the nature of the cause of action relied on, and, accordingly, in determining the section of the statute of limitations which may be applicable. But it is not contended here that the prayer for injunction has the effect of changing the cause of action from one for trespass upon real property to one governed by some other period of limitation. It still remains an action for trespass upon real property, and in such action the right to relief, whether legal or equitable, is barred in three years." (Ibid.)
Although at first glance our decision in this case may appear to be at odds with Williams, careful examination of Williams reveals why it is not. As the Supreme Court specifically observed in its opinion, neither party in Williams"contended ... that the prayer for injunction has the effect of changing the cause of action from one for trespass upon real property to one governed by some other period of limitation." (Williams v. Southern Pacific R.R. Co., supra, 150 Cal. at p. 628, 89 P. 599.) Thus, it appears the plaintiff in Williams effectively conceded (by not arguing otherwise) that his action was not one for the recovery of real property, which would have been subject to the five-year limitations period in sections 318 and 321.
This concession actually makes sense given the specific relief the plaintiff requested in Williams. In seeking injunctive relief, the plaintiff in Williams prayed only for an order "`that the defendant be permanently enjoined from operating said railroad'" (Williams v. Southern Pacific R.R. Co., supra, 150 Cal. at p. 625, 89 P. 599), not for an order requiring the defendant to remove the railroad tracks from his property. Thus, the action in Williams truly was one seeking to enjoin a trespass (the operation of the railroad across his property) and not one seeking to recover real property.
Here, in contrast, the Harrisons specifically sought injunctive relief requiring Welch to remove the woodshed and the landscaping from their property, and they *104 never conceded their action was one for trespass, as opposed to an action to recover real property. Thus, this case is distinguishable from Williams.
Although the trial court erred in concluding the Harrisons' request for injunctive relief was time-barred, that error was harmless because the trial court largely granted the Harrisons the relief they sought "through Welch's request for equitable relief."

DISPOSITION
The judgment is affirmed.
We concur: BLEASE, Acting P.J., and DAVIS, J.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of part I.
[1]  In an unpublished portion of our opinion, we also reject Welch's separate contention that the trial court erred in rejecting her claim to title by adverse possession.
[2]  All further statutory references are to the Code of Civil Procedure unless otherwise indicated.
[3]  At some point after 1994, Welch apparently placed the title to lot 7 in a living trust. Similarly, the Harrisons purchased lot 8 as the trustees of a family trust.
[4]  For ease of reference, we shall refer to the planter boxes, trees, and irrigation system jointly as the landscaping.
[**]   See footnote *, ante.
[5]  It should be noted that even though a person who encroaches on a residential boundary cannot establish an exclusive prescriptive easement, in ruling on the owner's request for injunctive relief, the court may refuse to enjoin the encroachment and may "exercise [its] equity powers to affirmatively fashion an interest in the owner's land which will protect the encroacher's use." (Hirshfield v. Schwartz (2001) 91 Cal.App.4th 749, 765, 110 Cal.Rptr.2d 861.) Such an equitable "encroachment right" is similar to, but doctrinally distinct from, a prescriptive easement. (See id. at pp. 767-771, 110 Cal.Rptr.2d 861.)

Here, after weighing all the relevant equitable factors, the trial court decided to enjoin Welch's encroachment, with exception of the buried sprinkler line. Welch does not claim the trial court abused its discretion in balancing the equities here.
[6]  Of course, in ruling on a request to enjoin an encroachment by a "substantial building structure," the court can take the nature of the structure into account in "weighing the relative hardships" and determining whether the injunction should be granted. (See, e.g., Christensen v. Tucker (1952) 114 Cal.App.2d 554, 559-562, 250 P.2d 660 [discussing cases].)
[7]  The railroad track was laid along Laurel Avenue, a public highway, and the plaintiff claimed title to a parcel of land "extending along and to the center line of Laurel Avenue." (Williams v. Southern Pacific R.R. Co., supra, 150 Cal. at p. 625, 89 P. 599.)
