McALLEN, Texas — The thousands of National Guardsmen sent to reinforce the U.S.-Mexican border two years ago have almost completely withdrawn, despite pleas from border-state governors once skeptical of using soldiers to catch illegal immigrants and drug smugglers.

When the Guard was posted along the southern frontier in 2006 to help the strapped Border Patrol, critics warned that sending soldiers would be an insult to Mexico and that innocents could get shot by troops trained for combat, not law enforcement.

But none of that happened, and now those worries have given way to fears that a bloody drug-cartel war on the Mexican side will spill into the U.S. and overwhelm the Border Patrol.

The four border-state governors who contributed the bulk of the troops have tried in vain to persuade Congress and the White House to extend the Guard's presence, which will end as scheduled on July 15.

"Until Border Patrol has all its new boots on the ground, there's going to be a vulnerability," said Pahl Shipley, spokesman for New Mexico Gov. Bill Richardson.

The Border Patrol said the National Guard force, which reached a peak of 6,000 before diminishing last year, bought it enough time to hire and train more agents. The patrol expressed confidence that it can hold the line on its own.

"We're fine taking over. It's all part of our plan," said Border Patrol spokesman Lloyd Easterling.

Only a few hundred Guardsmen are left on the border, most of them finishing up construction projects in Arizona and New Mexico.

The Guardsmen were sent in a support role, not to seize illegal immigrants and smugglers. They used helicopters and night-vision gear to watch for people trying to slip across the border, then told Border Patrol agents where to find them. They also built roads and fences.

The Border Patrol's ranks have swelled by nearly 5,000 since the beginning of Operation Jump Start, reaching more than 16,400. But the Border Patrol is still short of the 18,000-agent goal set for the end of the year. And border-state officials note those numbers include new hires who are not necessarily in place along the border yet.

Also, drug violence is surging in Mexican border areas, and "we certainly don't want that to spill across the border," Shipley said.

In late April, California Gov. Arnold Schwarzenegger and Arizona Gov. Janet Napolitano joined Richardson in signing a letter to Capitol Hill leaders begging them to extend the National Guard's presence.

"It is irresponsible to phase out the current support of the National Guard without the infrastructure and full-time personnel to fill the gap," the letter said.

Texas Gov. Rick Perry also lobbied Washington to keep the soldiers in his state, which constitutes 1,255 miles of the 1,950-mile U.S. border with Mexico.

"Not only when you cut down on law enforcement presence, but when it is known, there is an obvious threat," said Perry spokeswoman Krista Piferrer.

There was not the same unanimity when President Bush announced the plan in May 2006.

Then, Richardson worried the Guard would be stretched too thin heading into wildfire season. And Schwarzenegger said the National Guard was not trained for law enforcement duty. Perry and Napolitano supported the president's plan.

Eventually all four governors signed an agreement allowing their National Guard units to participate in Jump Start.

And despite fears of a repeat of 1997, when a Marine assisting the Drug Enforcement Administration in Texas mistakenly shot and killed a teenage goat-herder, not one Guardsmen shot anyone in the force's two years on the border.

In fact, the mission was criticized in January 2007 after several heavily armed men approached an observation site in remote Arizona and the National Guardsmen pulled back and radioed for the Border Patrol, as instructed, instead of shooting it out.

The soldiers were also credited with saving lives. When deadly tornados struck the Texas border town of Eagle Pass in April 2007, National Guardsmen on border duty were among the first to arrive. Two Texas National Guard soldiers received a medal for risking their lives to pull a woman from the Rio Grande in 2006.

"I think peoples' minds were changed on what the guard is here for," said Texas National Guard Col. Robert Canon, who oversaw Jump Start in Texas.