The State Department likes to call it the harbinger of both the CIA and the Department of Homeland Security.

One of the department's least-known operations emerged in the heated early days of World War I, when Secretary of State Robert Lansing was determined to hire someone to help him with security, espionage and intelligence threats, including the sensitive issue of tracking, expelling or interning diplomats from countries that were suddenly enemies. There was no CIA.

But wartime resources were tight in 1916, so the first "special agent" was paid out of Lansing's own pocket, according to State Department lore.

One agent soon grew to eight in the new Bureau of Secret Intelligence. But the quiet operation remained largely unknown even within government circles.

Nine decades later, with almost 1,400 special agents and a staff of 32,000, the renamed Bureau of Diplomatic Security has more agents deployed around the world than any other U.S. law enforcement agency. Its diverse and often dangerous missions are now on the frontline of the war on terrorism. Yet it remains little known -- deliberately.

At the recent Olympics, Diplomatic Security had about 100 agents embedded with the U.S. men's swimming team, women's gymnastics and several other teams, again more than any of the half-dozen or so U.S. agencies deployed in Athens.

During the 1995 raid in Islamabad, Pakistan, that captured World Trade Center bomber Ramzi Yousef, two agents were in the raid with Pakistani forces who seized him -- while the FBI waited outside. One agent had been the first to speak with the walk-in informant who identified Yousef's hideout. He then coordinated plans for the raid with Pakistani security forces.

Since the end of the U.S.-led occupation in Iraq on June 28, Diplomatic Security has taken over protection of the new U.S. Embassy in Baghdad, the largest diplomatic operation by any nation in the world.

It is also in charge of shielding about 7,000 American staff and many more relatives at the 265 U.S. embassies and consulates in 180 countries, an increasingly challenging mission since the 1998 bombings of the embassies in Kenya and Tanzania by al Qaeda. More than 200 were killed and more than 1,000 were injured in those al Qaeda attacks.

"The long tradition of diplomacy also has been marked by more sacrifice than most Americans will ever know. There are few professions more dangerous than the practice of foreign affairs, and there are few professionals who put more on the line for this nation than the agents of the Diplomatic Security service," Deputy Secretary of State Richard L. Armitage said last year.

In a role symbolic of its mission, one of the last people in the final helicopter to evacuate the U.S. Embassy during the fall of Saigon in 1975 was Leo Crampsey, Diplomatic Security's regional security officer, according to the State Department.

But its mission is far more than protection, U.S. officials say. Diplomatic Security is also in charge of investigations, from threats against the United States' diplomatic facilities overseas to visa and passport fraud, a central component in the war on terrorism.

Diplomatic Security's mission has expanded again recently to include the same service for foreign leaders. In Afghanistan, the bureau that normally protects Secretary of State Colin L. Powell and other high-profile U.S. diplomats is also now providing protection for President Hamid Karzai.

In Haiti, Diplomatic Security is protecting the interim president and prime minister while its agents train a new unit to replace them.

"We are a global force. The men and women who do this are not faint-hearted. Wherever the United States is threatened, you will find a Diplomatic Security person at work," said Ambassador Francis X. Taylor, assistant secretary of state for diplomatic security and director of the Office of Foreign Missions.

The bureau, which has doubled its number of special agents over the past dozen years as its duties have grown, also has a domestic mandate to protect visiting dignitaries. Those notables have included the Dalai Lama; Palestinian leader Yasser Arafat, when he visited the United Nations in the days when he was considered the leader of a terrorist group; and the Chinese table tennis team during its diplomatic icebreaking tour in the early 1970s, bureau officials said.

Although the Secret Service protects visiting heads of state, Diplomatic Security protects all other officials, including envoys from countries that do not have diplomatic relations with Washington, such as the Iranian foreign minister when he visits the United Nations.

"We analyze the threat and develop a security package and then work with his [security] people," a Diplomatic Security agent said.

Hundreds of agents will again be deployed in New York this month when foreign ministers and top officials of dozens of countries visit for the opening of the U.N. General Assembly, bureau officials said.

As a pivotal player in the war on terrorism since the bombing of two U.S. embassies in Beirut in 1983 and 1984, Diplomatic Security now runs the Anti-Terrorism Training Assistance program, which has trained more than 36,000 officials in 130 countries, according to the bureau. Its annual budget has grown from $5 million to $200 million.

It also administers the Rewards for Justice program -- which has paid out more than $57 million to about three dozen people since 1984 -- for information to "prevent, frustrate or resolve acts of terrorism against U.S. interests," according to State Department documents. That has included rewards for al Qaeda operatives as well as for the capture of Saddam Hussein's sons.

Diplomatic Security has an eclectic staff: Many have no background in the military, intelligence or law enforcement. The staff includes a genetic engineer, an astrophysicist, lawyers, a photojournalist and even a former herpetologist with the Philadelphia Zoo. All go through specialized courses that cover such things as intelligence, counterterrorism, languages and "sensitivity training" about foreign cultures.

"We are part of the foreign service and represent the U.S. across the board, so we try to recruit people with diverse backgrounds," said a senior Diplomatic Security official who spoke on the condition of anonymity because many do not want to be identified publicly. "We have one of the most highly educated forces in government."

Secretary of State Colin L. Powell toured Sudan with department protectors.State Department security personnel shield Afghan President Hamid Karzai. The department's security unit provides protection for some foreign leaders.