By Matt Spetalnick, David Lawder and Mark Hosenball

WASHINGTON (Reuters) - When Secret Service officer Timothy McCarthy took a bullet to protect Ronald Reagan in a 1981 assassination attempt and agent Jerry Parr shoved the president into a limousine, their quick reflexes projected a Hollywood-style image of invincibility around the agency.

Fast-forward to today: the 149-year-old Secret Service is struggling to emerge from a succession of scandals that have tarnished that iconic reputation, forced the abrupt resignation of its director and raised questions about its ability to fulfill its most critical duty: protecting President Barack Obama and his family.

Sources inside and outside the administration say many problems such as low morale, a leadership crisis and a culture of covering up mistakes can be traced back 11 years to when the Secret Service was pulled out of the Treasury Department and absorbed into the sprawling new Department of Homeland Security, where it had to compete for turf and money.

Even as the agency's workload has mushroomed, its manpower levels stagnated and its funding increases have failed to keep pace with growth in overall federal spending in the past decade, a Reuters examination of Secret Service budget data shows.

There is also growing pressure to consider whether the Secret Service’s divided mission, which includes investigating financial fraud and cybercrime, is diverting resources and attention from providing security for the president, his family and other top officials.

"We’ve seen what many think was a high point for the Secret Service," said Carolyn Parr, who co-authored a memoir with her husband, Jerry Parr, the agent who raced a wounded Reagan away from the scene of the shooting after John Hinckley Jr. opened fire outside a Washington hotel 33 years ago.

"What’s happening now is sad. I don’t know why the ball got dropped."

"MORE POLITICIZED"

The damage has been piling up, costing Secret Service director Julia Pierson her job on Wednesday. First came a Sept. 19 incident in which an Iraq war veteran with a knife scaled the White House fence and got deep inside the executive mansion.

Story continues

That was followed by the disclosure that an armed private security contractor with a criminal record rode on an elevator with Obama in Atlanta on Sept. 16, along with new details of a 2011 incident in which shots were fired at the White House.

Pierson, appointed in 2013 to clean up the agency after an embarrassing prostitution scandal in Colombia the year before, defended her agency in congressional testimony, acknowledging "mistakes were made" but failing to quell the firestorm.

Some see the troubles rooted in the 2003 decision by President George W. Bush to shift the agency into the newly formed Department of Homeland Security (DHS) as part of a centralizing of the “war on terrorism” after the Sept. 11, 2001, attacks.

The move ended the quasi-independence the Secret Service enjoyed at Treasury, where it was established in 1865 to suppress currency counterfeiting. At the DHS, it faced competition from other security agencies for funds and staffing.

"It became more politicized and more compliant ... often bowing to pressure from political staff at the White House or congressional staff during campaigns," said Ron Kessler, a national security consultant and author of the newly published book “The First Family Detail.”

"HOUSE-CLEANING IS NEEDED"

Some question if the Secret Service has spread itself too thin to adequately perform its dual roles of financial investigator and presidential protector, especially as online crime surges and threats to the presidency grow increasingly complex in an era of global terrorism.

The Secret Service first began the work of presidential protection in 1901 after the assassination of President William McKinley. It has steadily expanded since. In recent years, its mandate has mushroomed to include investigations of cyber theft, credit-card fraud and computer-based attacks on financial, banking and telecommunications infrastructure.

"Are the two missions of the Service compatible and how should they be prioritized?" the Congressional Research Service asked in a report on the agency released in mid-June.

Some former agents blame the Secret Service's troubles on a culture of rule-bending they say became entrenched years ago.

"If only the director goes, very little changes," said Dan Emmett, a former senior officer in the Secret Service’s Presidential Protective Division and author of the book "Within Arm’s Length." "A house-cleaning is needed at the top."

Other concerns include accusations the agency has favored men in promotions and condoned racism, a point reinforced in a class-action lawsuit filed in 2000 by African-American agents who accuse the Secret Service of a pattern of failing to address allegations of racial discrimination over many years.

The Secret Service's defenders point to half a century without an American president assassinated and say criticism of the agency has brewed for years, including in 1981 when it was forced to strengthen security measures after allowing a gunman to get so close to the president unscreened.

Asked whether Obama still felt safe, White House spokesman Eric Schultz said on Thursday: "Absolutely".

A tight budget complicates its mission. Pierson testified on Tuesday that the Secret Service had been stretched and was operating with around 550 fewer employees than its "optimal level." Despite an expansion in its work, its full-time workforce of 6,572 is just 66 higher than in fiscal 2005, according to DHS documents. http://link.reuters.com/fuw92w

And while its fiscal 2014 annual budget of $1.585 billion is up 35 percent from a decade ago, that lags federal spending, which is up 48 percent since 2005. The agency's budget has also failed to keep pace with the DHS' overall budget, which is up 54 percent in the same period, DHS budget data show.

"What many of us have taken for granted is that the president is always going to be well protected," Mark Meadows, a Republican on the House Oversight Committee, told Reuters.

(Editing by Jason Szep and Tom Brown)