President Reagan signed legislation Wednesday extending and strengthening federal protection for marine mammals, but environmentalists say the bill still allows tuna fishermen to kill hundreds of thousands of porpoises.

The measure reauthorizes the Marine Mammal Protection Act of 1972 for another five years and toughens U.S. penalties against nations that violate international agreements to protect whales.The bill expands the scope of the so-called Pelly Amendment, which empowers the president to bar fish imports from nations that continue whaling in violation of the 1986 worldwide ban by the International Whaling Commission.

The new law extends Pelly Amendment coverage to other ocean products, such as coral, pearls and seaweed.

Environmentalists say Japan, Iceland, Norway and South Korea continue to hunt whales on the grounds that their programs are for scientific purposes. Marine biologists charge the "research" whaling is a sham.

To date, the administration has not imposed Pelly Amendment sanctions against any nation. The only recent action involved a February agreement with Iceland under which U.S. officials agreed to hold off on sanctions if Iceland resolved "uncertainties" about the purpose of its whaling program.

However, Greenpeace and other environmental groups have sued the government to force sanctions against Iceland. They also have launched a boycott against Icelandic fish products, which account for 70 percent of the country's foreign earnings, including $200 million annually from the United States.

The new law also imposes a few new restrictions on tuna fishermen in an effort to reduce the "incidental" killing of porpoises in the Pacific Ocean, but environmentalists say the new protections are not nearly enough.

For reasons unknown to scientists, tuna in the eastern tropical Pacific - unlike other areas - often are found swimming directly under porpoises. As a result, tuna fisherman often set their nets around schools of porpoises, which are then ensnared and killed as the nets are pulled in.