The number of spills from offshore oil rigs and pipelines in U.S. waters more than quadrupled this decade, a trend that could have served as a warning for the massive leak in the Gulf of Mexico , according to government data and safety experts.

The spills — and the amount of oil that leaked — grew markedly worse even when taking increases in production into account, a USA TODAY analysis of federal data shows. The leaks came as the oil industry repeatedly claimed that offshore drilling was never safer.

YOU TELL US: How has the Gulf oil spill affected you?

From the early 1970s through the '90s, offshore rigs and pipelines averaged about four spills per year of at least 50 barrels, according to the Minerals Management Service (MMS). One barrel is equal to 42 gallons. The average annual total surged to more than 17 from 2000 through 2009. From 2005 through 2009, spills averaged 22 a year.

The company with the most spills from 2000 through 2009 is BP, which leased the well spewing millions of gallons of oil into the Gulf since April 20, according to the data. The oil giant and its affiliated companies reported 23 spills of 50 barrels or more, not including the latest blowout. Oil firm Shell was next with 21, according to MMS spill reports.

Environmental activists and safety experts said the increasing numbers of spills should have been a red flag that the industry needed to tighten safety practices and that federal regulators needed to improve oversight.

A similar trend of increasing leaks and fires occurred at a BP refinery in Texas City, Texas, before a fire and explosion killed 15 people in 2005, said Andrew Hopkins, a professor at Australian National University who wrote a book about the accident. Paying closer attention to the smaller incidents might have prevented the disaster, but BP's pay system gave employees no incentive to do so, he said.

FULL COVERAGE: The latest on the oil spill

"I suspect that the same may be going on with offshore oil spills," Hopkins said.

Richard Charter, a marine expert with the environmental group Defenders of Wildlife, said the smaller spills should have foreshadowed bigger mistakes were on the way.

"Carelessness is usually a sign of impending disaster," he said.

In the 1980s, an average of about 2,900 barrels of oil and other toxic chemicals spilled a year. That figure rose to more than 4,400 in the 1990s and to more than 6,100 in the 2000s. Offshore oil production increased during that time, but the rate of barrels spilled per barrels produced continued to increase.

The amount of spillage represents a small fraction of that piped out of the ground, according to the American Petroleum Institute, a trade group that represents the oil and gas industry.

MMS did not respond to requests for comment. BP also did not respond to a request for comment.

Richard Ranger, a senior policy adviser with the petroleum institute, acknowledged there have been "too many incidents" in the offshore industry. "The Deepwater Horizon incident compels a much deeper look at this information."