MELUN, France (AP) _ A passenger train on an overnight trip from the Riviera to Paris smashed head-on into a freight train early today, killing at least 16 people and injuring more than 50, authorities said.

The freight train crossed into the passenger train's path while switching tracks, officials said.

The passenger train was knocked off the rails in the crash at 6:30 a.m. near the station in Melun, 30 miles southeast of the French capital. It had originated in Nice and included four sleeper cars and four cars carrying automobiles.

The impact was so powerful that the first sleeper car hurtled on top of the locomotive pulling it.

The national railway's president, Jacques Fournier, said both trains were traveling between 37 mph and 43 mph at the time of the crash. His statement revised speed figures given earlier by other officials.

Fournier said the freight train rolled through a signal light as it crossed into the passenger train's track, but he said it was not known whether the light was red or green. He said the signal was working at the time.

Lt. Col. Guy Bernoux, director of the rescue effort, said passengers in the first car suffered the highest casualty rate. Rescue workers had to use ladders to climb into the shredded wreckage atop the engine in search of victims.

Transport Minister Paul Quilles arrived at the site at midmorning and announced that an inquiry would be launched immediately.

The engineer of the 12-car freight train, which carried metal cables, beams and other items, was killed.

A crewman aboard the passenger train also died, officials said. The engineer was found alive, trapped in his cabin, but his right leg was amputated in order to extract him six hours after the crash. Fournier told a news conference in Paris that 62 people were injured, 22 of them seriously. Police said 57 people were hurt.

Fournier said the railway was ''fully responsible for the accident and must draw the necessary conclusions'' regarding safety practices.

A passenger advocacy group, the Association of Consumers of Public Services, urged the railroad to install a radio-controlled safety system that could reduce speeds automatically even in cases of human error.

The passenger train was not one of the railroad's vaunted high-speed trains. They also use the Nice-Paris route, but a slower engine makes the overnight run in order to give passengers more time to sleep.

The train was carrying a little more than 100 passengers, officials said. At peak vacation times, the Paris-Nice overnight train has more cars and carries as many as 500 people.

President Francois Mitterrand issued a statement offering condolences to families of the victims. He urged investigators to determine the cause as quickly as possible.

It was the worst train accident in France since June 1988, when 56 people were killed in an underground collision at the Gare de Lyon in Paris.

France's worst train crash was on Dec. 12, 1917, when about 800 soldiers died in a derailment near Grenoble.