Post, C. J.
In the month of May, 1887, the plaintiff and defendant, being the owners in severalty of adjoining inside lots in the city of Lincoln, and being desirous of improving the same, mutually agreed to so build thereon as to have the entrance, hallways, and skylight in common, thus saving valuable space to each. It was further agreed that the two buildings should be heated as one, and by means of a single furnace. Pursuant to such agreement, three-*116story brick buildings were erected on the. lots mentioned, separated by a partition wall one story in height, the upper halls, or courts, being reached by a common stairway and receiving light and ventilation from a common skylight and each party paying one-half of the cost of the heating plant subsequently owned and used by them in common. This controversy was instituted by the plaintiff Barr in the month of J anuary, 1892, who alleged in the petition filed by him, in addition to the facts above stated, that the defendant, taking advantage of the common hallway, was destroying the value of his (plaintiff’s) property by maintaining a nuisance therein and by encouraging and permitting his (defendant’s) tenants to harbor therein lewd and disreputable characters, etc. The prayer of the petition was for the appointment of a receiver to take charge of and lease the premises and to manage the heating apparatus therein, also for a decree permitting the plaintiff to erect a partition wall upon his own premises from the cellar to the roof of his said building and to set aside and cancel the written agreements, three in number, under and by virtue of which the said buildings were constructed. An answer was in due time filed, in which, after setting out one of the several agreements relating to the buildings in controversy, it is alleged that said agreement remains in full force and effect, and expressly denying the plaintiff’s right to erect a wall as prayed by him and denying the jurisdiction of the court to award the relief sought. Accompanying the answer is a cross-petition in the following language: “The defendant consents to the erection of a brick wall between the said lot of this defendant and the said lot of said plaintiff, and that the heating fixtures, including the smoke stack, furnace, boiler, pipes, and utensils owned jointly by and between plaintiff and defendant' be sold. Defendant insists that the court shall sell said joint property above mentioned and erect said brick wall on the true line between the said lots, through the medium of a receiver or master commissioner or the proper *117officer appointed by the court for that purpose, and that such officer, by the aid of the county surveyor or other proper person, locate the true line between the said two lots prior to putting the said partition wall thereon, and defendant asks that said partition wall be built through the entire length and height of said building. Defendant therefore prays for the sale of said joint heating fixtures and the erection of said partition wall as aforesaid, and for judgment for damages as aforesaid, and for costs.” The agreement to which reference is made in the answer is as follows:
“This agreement, made and entered into this 7th day of November, 1890, by and between William Barr and Milton P. Lamaster, witnesseth:
“That whereas Milton P. Lamaster is owner of lot six (6), block fifty-eight (58), city of Lincoln, and William Barr is the owner of lot five (5), block fifty-eight (58), city of Lincoln; and whereas said parties have erected a three-story building upon each of said lots; and whereas the stairway and hall of the second and third floors are joined for the purpose of use and occupancy, it is therefore stipulated and agreed that the said hall and stairway shall always, during the existence of said buildings, be used and occupied by said parties jointly and severally; and it is further stipulated and agreed that the title to each party’s lot shall not in any way or manner be affected by the use of said joint occupancy by the said parties hereto, and that said halls and stairways, being located equally upon said lots, are to be used jointly by the said parties for the convenience of both of them, to the end that they may get a wider and more commodious hallway and stairway in said buildings, it being stipulated and agreed that the occupancy by one party of a portion of the other’s lot shall not in any way affect or becloud the title of the other party; and it is further stipulated and agreed that said buildings shall be heated jointly and each of the parties to this agreement to pay one-half of the expense for the same, *118■whether the buildings or any portion of them are occupied or vacated; also, that each party is to pay one-half of all expense for repairs to heating apparatus. It is further stipulated that all the heating apparatus in the halls of said building and boiler, and all heating- apparatus in the boiler room, is owned jointly by the parties hereto. It is further stipulated that the halls and stairway of said building shall be lighted jointly and that each of the parties to this agreement pay one-half of the expense of lighting the same. Neither of said parties shall have the right to remove or appropriate to his own use any of the heating or lighting apparatus belonging to said building or any other property or thing to said building belonging or owned in common by the parties to this agreement.
“It is further stipulated that this agreement shall be and remain in force for the period of twenty years, unless sooner canceled by the mutual consent of the parties hereto.
“Witness our hands, this 7th day of November, A. D. 1890. Wm. Baku.
“M. F. Lamaster.
“Witness: A. D. Burr.”
In an amended and supplemental reply to the defendant’s answer and cross-bill it is alleged that to erect a wall on the line between said buildings is wholly impracticable, since it would necessitate the remodeling of the interior of said building at great expense; that it would destroy the hallway, reduce the size of the rooms, and otherwise irreparably injure the plaintiff’s property, to his damage, etc. Subsequently the plaintiff, by leave of court, dismissed his petition and the cause proceeded to final decree upon the defendant’s cross-bill and reply thereto. The decree mentioned, and from which the plaintiff has prosecuted an appeal to this court, is as follows:
“And now on this 1st day of July, 1893, the court, being well and fully advised in the premises, doth find *119from the testimony that the plaintiff William Barr is the owner of lot five (5) and the defendant Milton F. Lamas-ter is the owner of lot six (6), in block fifty-eight (58), in the city of Lincoln; that upon said lots a three-story brick building is erected, and that said building contains a joint stairway and hallway on the second and third stories, said stairway and hallways being one-half upon each of said lots; that each of the said parties own the building upon their respective lots, but that in the construction of said building it was intended to be lighted and heated jointly and that the boiler, pipes, and chimney, etc., were paid for by the plaintiff and defendant, jointly, and that the boiler was placed upon the lot line between the said lots, and that the other portion of the joint property was placed upon lot five, except heating pipes and radiators, which the court finds were placed equally in each of the said buildings.
“The court further finds that it is impossible for the plaintiff and defendant to continue the joint use of said stairway and hallways, and that a partition wall should be erected between said buildings the entire length of said buildings, the center of said wall to be on the true lot line between said- lots, and that the erection of said wall shall be commenced on the 15th day of August, 1893, or as soon thereafter as possible.
“The court further finds that a partition wall has been erected between the said buildings extending to the second story thereof, except where the stairways are in front and the boiler now stands.
“It is therefore ordered, adjudged, and decreed that a partition wall be built through said stairway and extend through the hallways on the second and third stories, and from the basement in front for the entire length of the building, including the space where the boiler now stands, to the skylight in said building on the lot line, and that each of said parties pay for one-half of the expense of the same, and that James Tyler, architect, be, and is hereby, appointed special commissioner to erect *120said wall, said special commissioner to advertise for bids for having said wall built for at least ten days in a newspaper of general circulation in Lincoln, and said work to be let to the lowest responsible bidder,'with power reserved to reject any and all bids and re-advertise.
“It is therefore ordered, adjudged, and decreed that said James Tyler shall appraise the property owned in common by said plaintiff and defendant, and may call to his assistance, at his option, any persons acquainted with the value thereof and notify each of said parties of said appraisement, and if either of said parties desire to take said property at said appraisement, to pay James Tyler the one-half of said appraised value and shall have the privilege so to do, each party having first choice of taking joint property at appraised value situate on his lot, otherwise said James Tyler shall advertise and sell said property as upon execution, except the chimney, which shall be taken down and used in the erection of said partition wall if neither of said parties will pay the appraised value thereof, and except also the sewér which was erected on lot five (5) at the joint expense of the plaintiff and the defendant, which- shall be taken at the appraised value of the same by the owner of lot five (5), William Barr, at his option, and also other permanent water pipes and other fixtures that are the joint property of said Barr and Lamaster and located upon said lot five (5), and said Lamaster shall take, at its appraised value, any such property located on lot six (6), at his option. Either party to have the right to appeal from the ap-praisement of property on his lot solely situated to the district court on giving bond in double the amount to prosecute the appeal and to pay the appraisement determined at the end of the litigation.
“It is further ordered, adjudged, and decreed that the said plaintiff William Barr and the said defendant Milton F. Lamaster each pay one-half of the costs of this action, the costs of the plaintiff being taxed at f-and *121the costs of the defendant being taxed at $-, and for all of which execution is hereby awarded,” etc.
The proceeding, as submitted to the district court, appears to haye been regarded as an equitable partition between the parties to the decree, of the property thereby affected, and in that light it must be yiewed for the purpose of this appeal.
It is first argued by the appellant that the cross-bill failed to state a cause of action since there can be no partition of property owned in severalty. It may be stated as a general proposition that where the parties are neither joint tenants nor tenants in common, or copart-ners, but each owning distinct and several parts of the property described, an action for partition thereof will not lie. (Freeman, Cotenancy & Partition, secs. 87, 431 et seq.; Russell v. Beasley, 72 Ala., 190; M’Connel v. Kibbe, 43 Ill., 12; Johnson v. Moser, 72 Ia., 523; Anderson School Township v. Milroy Lodge, 130 Ind., 108.) The foregoing general rule is in strict accord with the provisions of our Code for the partition of real property, viz.: “When the object of the action is to effect the partition of real property among several joint owners, the petition must describe the property and the respective interests, and the estates of the several owners thereof, if known. All tenants in common or joint tenants of any estate in land may be compelled to make or suffer partition of such estate or estates in the manner, hereinafter prescribed.” (Code Civil Procedure, sec. 802.) In Hurste v. Hotaling, 20 Neb., 178, the court, by Maxwell, C. J., after quoting the foregoing section, say: “The controlling principle in partition, therefore, without regard to the extent or quantity of the interest, is that the parties shall be joint tenants in common of an estate in land. * * * Only joint tenants or tenants in common of an estate in land, however, can institute the proceeding.” In Johnson v. Moser, supra, the plaintiff had, by purchase at sheriff’s sale, acquired title to the first and fourth stories of a certain brick building, also the cellar thereunder except *122that portion used by .tbe execution defendant for tbe storage of vegetables and provisions for tbe use of bis family. It was held that an action for tbe partition of tbe cellar by metes and bounds could not be maintained, tbe parties being neither joint tenants nor tenants in common, but owners in severalty of distinct and separate portions thereof. In Anderson School Township v. Milroy Lodge, supra, tbe parties had erected a building under an agreement whereby tbe plaintiff was to own and control tbe ground and first story subject to tbe defendant’s right of entrance to tbe third story to be owned and occupied by it. Elliott, C. J., speaking for tbe court, after bolding that partition should be denied on the ground that it would destroy tbe defendant’s right of access to its lodge room, adds: “But this is not tbe only reason why appellant is not entitled to partition, for there is this additional reason, namely, each party owns its part of tbe building in severalty. As each party owns its part of tbe property in severalty, it is legally impossible that partition can be awarded, for there is no community of interest.” By virtue of tbe agreements under which tbe buildings were erected each party to this controversy has an easement in so much of tbe balls and skylight as is situated upon tbe lot of tbe other; and, in tbe language of plaintiff’s counsel, such easements “are in no way inconsistent with entire several ownership of tbe two buildings, and tbe mere existence of cross-easements does not authorize tbe court to make partition, because each party owns bis easement in tbe property of tbe other in severalty.”
Tbe defendant, it is shown, granted to tbe plaintiff tbe easement in tbe hallways and skylight voluntarily, and for a valuable consideration, viz., tbe grant to him of a cross-easement therein. Such easement is real property — an incorporeal hereditament, and as much a paid; of tbe plaintiff’s estate as tbe building itself. Tbe defendant is not merely prohibited from interfering with tbe access of the plaintiff and bis tenants to tbe building *123of the latter by means of the common hallways and their free enjoyment of the common skylight, but equity would interfere to prevent the tearing down or destroying by him of his own building during the existence of such easement (2 Story, Equity Jurisprudence [12th ed.], sec. 927; Trustees of Columbia College v. Lynch, 70 N. Y., 440; Henry v. Koch, 80 Ky., 391); and should he ■suffer his building to decay, the plaintiff would have the right to enter for the purpose of repairing, in order to preserve his easement therein. (2 Washburn, Real Property, p. 79*; Washburn, Easements & Servitude, 654; Prescott v. White, 21 Pick. [Mass.], 341; McMillan v. Cronin, 75 N. Y., 474.) But the decree is defended upon the ground that the plaintiff, by the petition to which reference has been made, and by which he sought permission to erect a partition wall on his own premises, abandoned whatever easement he enjoyed in the defendant’s property and that he is accordingly now estopped to call in question the power of the court to grant the relief awarded. But to that contention there are two sufficient answers: First, the allegations of the petition, in so far as they relate to the rights of the parties under the agreements mentioned, are in substantial accord with the statements of the answer, and the alleged estoppel is predicated not upon any statement of fact but upon the pleader’s conclusion from the facts stated by him; •second, the plaintiff, for reasons not disclosed, but presumably because he was not entitled to the relief prayed, dismissed his petition previous to the hearing of the cause in the district court. A party will not, it is true, be permitted to shift his position during the trial by pleading one cause of action or defense and recovering upon another; but that doctrine can have no application to the case before us where the alleged variance consists in the mere assertion of legal proposition in a proceeding previously dismissed on the plaintiff’s own motion. The decree is reversed and the action dismissed.
Reversed.