Valdheim expanded with remarkable speed in the opening decades of the nineteenth century, and its old core grew steadily more crowded. Matters were worsened by the spreading overground railway network, which poured ever-larger crowds into the city. When a government commission ruled in 1851 that trains must be kept out of the Kvarter — the ancient commercial district at the city's heart — the overground termini were left strung in a ring around it rather than reaching inside. Within that ring lay a maze of flimsy, overcrowded tenements, and its streets were choked with horse-drawn traffic. Crossing the Kvarter was a misery: eight kilometres by carriage or omnibus might swallow up an hour and a half. Plenty of remedies were proposed, yet hardly any came to anything.
One of the loudest voices calling for action was that of Emil Sandhåg, a lawyer employed by the Valdheim city council. To his mind, an underground line tying the scattered overground termini into a single network would bring benefits at once social and economic, since the same works could sweep away the worst slums. He proposed to resettle the poorer labourers packed into the central tenements in housing newly built on the city's outskirts, and to run trains cheap enough for them to reach their work. A number of merchants came round to Sandhåg's thinking, and in 1856 he laid a scheme before the assembly. It was thrown out, but happened to arrive alongside a rival group's proposal for an underground link between the termini, and that second plan won approval.
The two camps joined forces, and in August 1859 the Central Valdheim Railway Company came into being. Its aim was to build an underground line from the Nordhavn terminus of the Nordhavn & Western Railway to Kolstad, on the fringe of the Kvarter — a stretch of not quite five kilometres. Money for so bold and costly a venture proved hard to come by, and the hostile pieces filling the newspapers did nothing to help. Opponents warned that the tunnels were bound to cave in beneath the weight of traffic overhead, that nearby buildings would be shaken loose, and that fumes from the engines would poison anyone riding below. Sandhåg and his associates pressed on regardless.
For the Nordhavn & Western, the attraction was obvious — the line would let its trains run at last into the very centre of Valdheim — and it put close to 250,000 kroner into the project; the full million kroner needed came only gradually, over five years. To hold down the cost of demolition, the planners traced the route below roads that already existed. Work expected to take twenty-one months in the end ran on for nearly four years. The line was laid just beneath the surface by the method called 'cut and cover': labourers opened a trench roughly ten metres across and six deep, its walls braced for the time being with timber; masons then raised brick side-walls and closed the top with a brick arch to form the tunnel; over this a layer of earth about two metres thick was spread, and the roadway above was put back.
When it opened, on 12 March 1868, the Central Valdheim line became the first underground railway anywhere in the world. Some 35,000 people were carried between Nordhavn and Kolstad on that opening day, each trip lasting around twenty minutes, and by the close of the line's first twelve months close to ten million journeys had been recorded.
Approval for the earliest extensions came through even as the line was opening, and over the following five years these were carried out, pushing east to Bergsli and west as far as Vestport. Steam locomotives heated by firebricks in their boilers had been the original intention, but engines of that kind were never put into service; in their place ran specially built locomotives whose water tanks allowed the steam to be condensed. Smoke and foul air nonetheless remained a nuisance, notwithstanding the ventilation shafts sunk into the tunnels.
For all this new mileage underground, the congestion in Valdheim's streets was by the 1890s worse than before. Part of the trouble lay in the network's shape: the existing lines circled the middle of the city and reached out to the outskirts, but none actually ran across the centre itself. There 'cut and cover' could not be attempted, and the only way left was to drive tunnels far below ground.
The means of boring such tunnels already existed, yet steam engines were useless in so cramped a space. Only once a dependable electric motor had been devised, along with a way of carrying power from the generator to a moving train, did the world's first deep-level electric railway become feasible: the Valdheim & Southern, which opened in 1894 and ran from the centre out to Myrdal, on the far side of the River Glåma. Its trains, each of three carriages, were worked by electric engines. So narrow were the carriages that their windows sat as mere slits just under the roof, on the assumption that no passenger would care to gaze out at bare tunnel wall. An unreliable power supply caused most of its troubles; and for all its engineering merit, the Valdheim & Southern never turned a profit. Matters changed in 1903, when the Cross-City Railway — soon nicknamed the 'Ten-Øre Line' after its flat fare — opened with electric locomotives of a new design. Its popularity was immediate, and before long further lines and extensions joined the growing network; by 1910 the core of the system Valdheimers ride today was in place.