MEXICO CITY — Responding to a growing sense that Mexico’s military-led fight against drug traffickers is not gaining ground, the United States and Mexico set their counternarcotics strategy on a new course on Tuesday by refocusing their efforts on strengthening civilian law enforcement institutions and rebuilding communities crippled by poverty and crime.

The $331 million plan was at the center of a visit to Mexico by several senior Obama administration officials, including Secretary of State Hillary Rodham Clinton; Defense Secretary Robert M. Gates; Homeland Security Secretary Janet Napolitano; Adm. Mike Mullen, chairman of the Joint Chiefs of Staff; and Dennis C. Blair, the director of national intelligence.

The revised strategy has many elements meant to expand on and improve programs already under way as part of the so-called Mérida Initiative that was started by the Bush administration three years ago, including cooperation among American and Mexican intelligence agencies and American support for training Mexican police officers, judges, prosecutors and public defenders.

Under the new strategy, officials said, American and Mexican agencies would work together to refocus border enforcement efforts away from building a better wall to creating systems that would allow goods and people to be screened before they reach the crossing points. The plan would also provide support for Mexican programs intended to strengthen communities where socioeconomic hardships force many young people into crime.