SAN FRANCISCO — After a two-year effort spurred by a rise in accidents, federal maritime officials have approved a plan to protect whales in and around San Francisco Bay. It includes rerouting shipping traffic and establishing better ways to track whale locations.

The changes crafted by the National Oceanic and Atmospheric Administration, shipping industry representatives, whale researchers, and the Coast Guard will probably take effect next year, after a final review by the United Nations International Maritime Organization.

Scientists studying the carcass of a 47-foot fin whale that washed up on a beach in the Point Reyes National Seashore last month found the creature’s spine and ribs severed, apparently from the propeller of one of the huge cargo ships that sail those waters.