UNITED NATIONS  After years of wrangling, most United Nations member states agreed early on Saturday in Japan to set significant new goals to reverse the extinction of plant and animal species. As part of the accord, they also agreed that rich and poor nations would share profits from pharmaceutical or other products derived from genetic material.

The negotiations among mostly environment ministers from about 190 countries in Nagoya, Japan, ultimately produced an agreement that had seemed distant just hours before the meeting ended.

The agreement, known as the Nagoya Protocol, sets a goal of cutting the current extinction rate by half or more by 2020. The earth is losing species at 100 to 1,000 times the historical average, according to scientists who call the current period the worst since the dinosaurs were lost 65 million years ago.

The new targets include increasing the amount of protected land to 17 percent, from the current figure of about 12.5 percent, and protected oceans to 10 percent, from less than 1 percent. The protocol also includes commitments of financing, still somewhat murky, from richer countries to help poorer nations reach these goals.