delivered the opinion of the Court.
In this appeal, as in that of the companion case, Southern Railway v. Darnell, 221 Va. 1026, 211 S.E.2d 175 (1981), this day decided, it is necessary that we construe Code § 56-16.1 The dispositive question in the present case is whether a landowner whose land lies on only one side of a railroad right-of-way is entitled under the statute to require the railroad company to repair a bridge which it constructed as part of a wagonway across such right-of-way.
Hugh L. Boy, Jr., and Madge Boy, his wife, filed a petition in the trial court against Southern Railway Company and Virginia and Southwestern Railway Company (collectively, the Railways), to.require the Railways to repair a bridge affording ingress and egress to and from the Boys’ land. The petition alleged that the land was originally a part of a tract lying on both sides of and adjacent to the Railways’ right-of-way, that the Railways had constructed and maintained the bridge across Little Moccasin Creek, that a substantial portion of the bridge was within the right-of-way, that the bridge had fallen into disrepair, and that the Railways had refused requests made by the Boys to repair it. Petitioners sought the appointment of three *1024disinterested persons as a board of commissioners to determine whether the bridge should be repaired.
The Railways filed a demurrer on the ground, inter alia, that the petition failed to state a cause of action because it showed on its face that the Railways’ right-of-way did not pass through the petitioners’ lands. After this demurrer and the demurrer in the companion case had been filed, the trial court considered the cases jointly. On May 22, 1974, the trial judge notified counsel that before he ruled on the demurrer he desired that evidence be taken to determine whether the Boys owned any land on the north side of the Railways’ right-of-way. Pursuant to this request, evidence was taken by depositions that established that the Boys owned no land on that side of the right-of-way. At one time, before acquiring their land on the south side, they bought and then sold a strip of land on the north side, but they never owned both parcels at the same time and, thus, at no time did they own land through which the right-of-way passed.
By letter opinion dated April 5, 1975, the trial court found that the crossing was constructed when the railroad ran through lands of common ownership, and that the Boys did not own land on the north side of the right-of-way, but ruled that the right of the Boys to require the Railways to maintain the bridge was not lost merely because the land to the north was now owned by another. After entry of the order overruling the demurrer, the Railways filed an answer to the petition. The trial court, without hearing any evidence, entered an order on July 14, 1975, ruling that the Boys were entitled to require the Railways to keep the wagonway in repair and appointing three persons as a board of commissioners under Code § 56-16 to determine whether the bridge was in need of repair “and should be repaired by the defendants”.2
The Board of Commissioners convened, viewed the bridge, heard evidence, and reported in writing that the bridge and wagonway were in need of repairs and that the repairs should be made “by Southern Railway”. Exceptions to the report were filed by the Railways.
A hearing on the exceptions was conducted by the trial court, with a different judge presiding, his predecessor having retired. The court, ruling that all relevant issues had been determined by the order entered on July 14, 1975, except the question whether the bridge was in need of repairs, declined to review the earlier ruling. The court found that *1025there was evidence to support the Commissioners’ report and entered a final order on October 27, 1978, overruling the exceptions and directing the Railways to repair the bridge.
On appeal, the Railways contend that the Boys, owning property that adjoins the Railways’ right-of-way on only one side, may not invoke the provisions of Code § 56-16. We agree.
The substantive provisions of this statute were first enacted in 1837 as a part of the general regulations for the incorporation of railroad companies. Acts 1836-7, c. 118, § 16. In the Code of 1849, the provisions were extended to corporations generally in § 22 of Chapter 56, as follows:
“For every person, through whose land the road or canal of a company passes, it shall provide proper wagon ways across the road or canal, from one part of the said land to the other, and keep such ways in good repair.”
It is apparent that the purpose of the statute is to afford relief only to a landowner through whose land a railroad is constructed and maintained so that the landowner may have access from his land on one side of the railroad to his land on the other side. A railroad right-of-way passes by but not through the land that adjoins it on only one side, and the owner of such land does not come within the purview of the statute. Southern Railway v. Anderson, 203 Va. 991, 995-96, 128 S.E.2d 429, 432-33 (1962).
Accordingly, the statute is not applicable to the Boys because their land lies on only one side of the railroad, and the trial court erred in overruling the Railways’ demurrer.
We will reverse the judgment of the trial court and dismiss the petition.
Reversed and dismissed.
Code § 56-16 provides in pertinent part:
§ 56-16. Wagonways to be constructed across roads, canals and other works; enforcement. — Every public service corporation, whose road, canal, or works passes through the lands of any person in this State, shall provide proper and suitable wagonways across such road, canal, or other works, from one part of such land to the other, and shall keep such ways in good repair. Such ways shall be constructed on the request of the landowner, in writing, made to any section master, agent, or employee of such company, having charge and supervision of the railroad, canal, or other works at that point, and shall designate the points at which the wagonways are desired; and if there be no section master, agent, or employee of such company, having charge or supervision of the railroad, canal, or other works at such point, then on the request of the landowner, in writing, made to the company, or any officer or director thereof. If the company fail or refuse for ten days after such request to construct wagonways of a convenient and proper character at the places designated, then the owner, having given ten days’ notice in writing, as aforesaid, may apply to the circuit court of the county or the corporation court of the city wherein such land is located for the appointment of three disinterested persons whose lands do not abut on such railroad, canal, or other works, who shall constitute a board of commissioners whose duty it shall be to go upon the land and determine whether the wagonways asked for should be constructed. The decision of such board shall be in writing, and, if favorable to the landowner, it shall set forth the points at which the wagonways should be constructed, giving also a description of what should be done by the company to make a suitable and convenient way.
We held in Darnell that Code § 56-16 does not authorize the appointment of commissioners to determine whether repairs to a wagonway should be made. In the present case, however, the error of the trial court in appointing commissioners is irrelevant.