ALAMEDA, Calif. — Vice Adm. Fred Midgette, commander of Coast Guard operations in the Pacific Area, has a challenge almost as vast as the ocean he patrols in search of drug traffickers, with responsibilities for an area that is twice the size of the continental United States.

The Coast Guard is struggling to keep pace, seizing about 20 percent of all the drugs that come into the United States through a coastal border, as its aging fleet attempts to pursue the speedboats favored by the traffickers.

“When most people think border security, they think Border Patrol,” Admiral Midgette said. “What we do by intercepting drugs on the high seas has a direct connection to what happens at the southern border in terms of stopping illicit drugs and illegal immigration.

The Run-Up

The podcast that makes sense of the most delirious stretch of the 2016 campaign.

“When you are stopping drugs at the Rio Grande, that’s already a loss,” he added. “You want to push that stuff off from America as far as you can.”

But that is becoming increasingly difficult for the Coast Guard, which has operated with flat budgets even as its mission has expanded to include intelligence and antiterrorism.

There are newer ships like the Stratton, a Coast Guard cutter, but many others in the fleet are more than 50 years old. President Trump’s new budget would cut Coast Guard funding by 2.4 percent.

The proposed reduction in money comes as the smuggling problem has become more urgent. About 70 percent of the cocaine consumed in the United States passes through a corridor that runs up to the borders of Guatemala and El Salvador. Fighting among drug cartels that control the smuggling routes has led to record-high homicide rates and driven thousands of people to the United States-Mexico border seeking asylum.

Founded more than 100 years ago, the Coast Guard, which is part of the Department of Homeland Security, operates simultaneously as a military service, a law enforcement agency and as a member of the American intelligence community. Known primarily for its role in search and rescue missions, the Coast Guard said its priorities are tackling drug trafficking organizations and protecting the southern border.

Funding the Coast Guard at current levels — nearly $10 billion — leaves the service struggling to combat the drug trafficking that has been pushed offshore by beefed up security on the southern land border.

“We give you the biggest bang for the buck,” said Adm. Paul F. Zukunft, commandant of the Coast Guard. “But our resources are limited. As a result, we can’t catch all the drug smuggling we know about. Just last year we had intelligence on nearly 580 possible shipments but couldn’t go intercept them because we didn’t have the ships or planes to go after them.”

The 418-foot Stratton, based in Alameda, is one of the most advanced vessels in the Coast Guard fleet, equipped with advanced radar systems, infrared video, a helicopter and a small drone called the ScanEagle. Built in 2012, it is one of six national security cutters that are in service and provide a significant upgrade to the Coast Guard’s arsenal.

On a recent morning aboard the Stratton, dozens of crew members dressed in blue work uniforms scurried about making repairs. The sound of drilling echoed through the corridors of the ship. In less than four weeks, the Stratton will be headed out to sea.

In the expanse of the Pacific, cutters like the Stratton target fishing boats, speedboats called pangas and homemade submarines that are used to smuggle tons of drugs from Central America through Mexico and ultimately into the United States. Cartels in Latin America and the Caribbean have increasingly turned to trafficking on the high seas as cocaine production in South America has reached record levels.

Catching drugs in the ocean is vital to Homeland Security efforts because that is when the volume and the purity of the drugs are at their highest. It is also where drug traffickers are most vulnerable.

“We take advantage of the fact that we have the advantage on the water,” said Capt. Nathan Moore, the departing commander of the Stratton. ‘‘When they see that huge ship coming at them over the horizon, most of them just give up.”

Captain Moore said that even with all the technology on the Stratton, finding a panga or narco sub painted blue to blend in with the ocean was difficult. The Coast Guard said it intercepted a record six narco subs during the 2016 fiscal year.

Most of the illegal vessels are sunk. Last year, the Coast Guard seized a record 450,000 pounds of cocaine, valued at nearly $6 billion, an amount that was more than all the cocaine seized by land-based law enforcement agencies combined. Coast Guard boats also intercepted nearly 7,000 people trying to illegally enter the United States, officials said.

Coast Guard officials say the intelligence gleaned from captured drug shipments and vessels has helped lead to the extradition of nearly 75 percent of all Colombian cartel leaders. And it contributed to the capture of Carlos Arnoldo Lobo, a Honduran cartel leader, and to the second capture of Joaquín Guzmán, the Mexican drug lord better known as El Chapo.

Interactive Feature | Get the Morning Briefing by Email What you need to know to start your day, delivered to your inbox Monday through Friday.

But drug interdiction is only one of its missions. Coast Guard personnel protect domestic and foreign ports from terrorist threats, and elite counterterrorism teams are deployed worldwide to provide security at ports and other maritime installations.

In the United States, they patrol ports looking for terrorists and other threats. Antiterrorism units, called maritime safety and security teams, carry out port safety patrols and are trained to operate after an attack by chemical, biological or radiological means.

The service also screens passengers on cruise ships and the crews of foreign cargo vessels entering the United States. The Coast Guard said it turns away hundreds of people each year after they are flagged for not having proper documentation or because of negative information in national security databases.

The service even plays a role in protecting the president.

Coast Guard counterterrorism teams protect Mr. Trump during his frequent trips to Mar-a-Lago, the president’s private club in Palm Beach, Fla. Boat teams protect both the Atlantic and Intracoastal Waterway sides of the property, while helicopters keep drones and other low-fliers out of the airspace.

The trips have added to the costs of already overextended operations because the Coast Guard has no additional funding for the protection of the president at his resort.

The widening mission and shrinking budget have left some Coast Guard officials questioning whether they can successfully fulfill their mission.

“We continue to be able to see a significant amount of drug trafficking toward Central America and Mexico,” Admiral Zukunft said. “We are besieged in the region because of a lack of resources. Drug traffickers simply have more boats and crafts than we have ships and planes to catch them.”