President Carter signed into law yesterday a bill that reduces nearly a century of federal government regulation of the nation's freight railroad industry.

Although it does not deregulate the railroads as substantially as the Carter administration initially had proposed, the new law's provisions give the railroads significant new pricing and operating flexibility that will allow them to begin marketing their services more like other major American industries and services.

"By stripping away needles and costly regulation in favor of marketplace forces wherever possible, this act will help assure a strong and healthy future for our nation's railroads and the men and women who work for them," Carter said yesterday at a signing ceremony in the White House Cabinet Room.

The new law -- named the Staggers Rail Act of 1980 after House Commerce Committee Chairman Harley O. Staggers (D-W. Va.), who is retiring from Congress this year -- is designed to substitute competition and individual railroad actions, as much as possible, for the protective regualtion of the Interstate Commerce Commission and the collective pricing that has characterized the rail industry for most of the last 100 years.

The act pares back the ICC's rate regulation by gradually increasing the amount of freedom railroads have to price their services without ICC intervention. Under the law's scheme, the ICC cannot interfere with a railroad's proposed rate so long as it is below a threshold level for ICC jurisdiction. p

The threshold has been set at an initial level that is supposed to make sure railroads cover the out-of-pocket costs of actually transporting goods on a given movement something not always true today plus make a contribution to fixed costs, such as roadbed maintenance and capital costs. Shippers whose transportation options are limited or non-existent are to be protected from unreasonable rate increases by the attention of ICC jurisdiction over the threshold level. If a proposed rate is above the level, which rises each year for the next four, the ICC may disallow it.

Also under the bill, the railroads generally are granted a zone of flexibility within which then can raise rates 6 percent a year for the next four. While their individual pricing freedoms are enhanced, the rails' collective rate-setting practices are curtailed, and the ability of the industry to get general rate increases will be eliminated altogether in 1984.

While some railroad freight rates are expected to rise, government officials contend that rationalization of rail systems, new efficiencies and productivity induced by management and labor, and the spur of new competition that will result from the new law may offer shippers some lower rates and better services.

Overregulation generally has been blamed for the lackluster financial performance of the rail industry in recent years. Even though some rails are very profitable, the industry in general earns a rate of return on investment close to 2 percent, compared with four and five times that for many other industries.

The rail act is the third of three transportation deregulation measures supported by the Carter administration and signed into law. An airline bill was signed earlier this year. All three were designed to induce more competition into traditionally heavily regulated sectors of the economy.