German national railway Deutsche Bahn (DB) and power company RWE signed on Monday a 15-year hydro-electric supply contract worth 1.3 billion euros ($1.9 billion).
RWE is to supply the railway operator with about 900 million kilowatthours of electricity per year, enough to run about one third of the DB's long distance trains for a year.
The same quantity would supply 250,000 German households for a similar period.
RWE, the second biggest German power group, is building up its capacity to produce renewable energy as the government phases out nuclear power by 2022 in Europe's biggest economy.
Deutsche Bahn bills itself meanwhile as the "biggest consumer of green energy" in Germany, and the percentage of electricity generated by renewable sources for the railway is to increase from 19.8 percent to 28 percent.
The contract covers the period from 2014 to 2028 and is to involve output from 14 hydro-electric generating plants.
By 2013, RWE said it will have invested almost four billion euros in expanding its alternative energy production capacity.
""With this move, we are getting closer to our vision of meeting all the railways' electricity needs with renewable energy by 2050," the statement quoted DB chairman Ruediger Grube as saying.
Explore further: Anti-nuclear rally in Tokyo draws tens of thousands