Congressional Democratic leaders have embraced the goal of increased border security in their fight with President Trump, proposing measures to harden the U.S. ports of entry — but omitting the barrier they supported five years ago.

Those designated border crossings account for roughly 2.5 percent of the 2,000-mile U.S.-Mexico border.

The proposal also represents a small fraction of the security measures, including hundreds of miles of border fence, that garnered broad Democratic support a little more than five years ago before Mr. Trump entered the picture.

Democrats now are limiting the security measures they back to sending more customs officials and deploying new technology at the 48 ports of entry or border crossings where cars and trucks line up to seek legal entry into the U.S.

The effort likely would help combat the flow of opioids and other narcotics into the U.S., helping achieve a top priority for the Trump administration.

The proposals, however, don’t include the fence demanded by Mr. Trump to help secure areas of the border that stretch across vast desert wilderness.

House Speaker Nancy Pelosi outlined the Democrats’ vision of border security Tuesday night in a televised response to Mr. Trump’s prime-time address about what he called a “humanitarian and security crisis” on the border.

Mrs. Pelosi said everyone agrees on the need to secure the border.

“We can build the infrastructure and roads at our ports of entry. We can install new technology to scan cars and trucks for drugs coming into our nation. We can hire the personnel we need to facilitate trade and immigration at the border. We can fund more innovation to detect unauthorized crossings,” she said.

Congressional Democrats often cite drones as a prime example of the innovative technologies available for the rest of the border, but no specific plans have been laid out.

Mrs. Pelosi has called border walls “immoral” and refused to give an inch in negotiations over Mr. Trump’s demand for $5.7 billion for new barriers, Border Patrol agents, immigration judges and other tools to stem illegal immigration.

Rep. Matt Cartwright, co-chairman of the House Democratic Policy and Communications Committee, said it would be foolish to build barriers in the desert.

“The first thing to focus on are the ports of entry where all the drugs are coming through or the tunnels,” he said on Fox News. “This is why we’ve increased Customs and Border Protection because this is how you stop the entry of this stuff, not by building walls in places where goats don’t even climb and people don’t travel.”

Mr. Trump bucked attempts to limit the border security debate to ports of entry.

“They don’t come in through checkpoints, they come through areas where you have hundreds of miles without walls and without barrier or without strong fences,” Mr. Trump said at the Capitol.

The president was on Capitol Hill to rally the support of Senate Republican amid a government shutdown that has lasted nearly three weeks.

He said the GOP remained unified on border security.

The bollard-style corrugated steel border fence currently advocated by Mr. Trump once garnered broad support among Democrats.

In 2013, every Senate Democrat voted for a bipartisan immigration reform bill that included nearly $8 billion for 350 more miles of border fence.

Senate Democrats voting yes included Minority Leader Charles E. Schumer, Minority Whip Richard J. Durbin, and Sens. Dianne Feinstein, Tim Kaine, Kirsten Gillibrand, Mazie Hirono, Amy Klobuchar, Bob Menendez, Richard Blumenthal and Sherrod Brown.

The bill also would have spent about $30 billion to hire 20,000 more Border Patrol agents. Helping secure the Democrats’ support, the legislation entailed broad changes to immigration laws and offered a 13-year path to citizenship for the approximately 11 million illegal immigrants living in the U.S. at the time.

The current debate does not include pro-immigration sweeteners. The White House team included the added scanners and manpower at ports of entry that Democrats support.

White House deputy press secretary Hogan Gidley said the Democrats’ support for the 2013 bill and a 2006 bill for a border fence showed that their opposition to a border wall was “partisan petty politics.”

“The president has now put forth a proposal that includes a strategy to protect the American people with technology at our ports of entry to counter narcotics and weapons coming into this country, detention beds for people who get into this country illegally, humanitarian needs and to allow people to claim asylum in their country of origin. But that includes a steel barrier,” he said.

Democrats remained united in opposition to a border wall.

“The symbol of America should be the Statue of Liberty, not a 30-foot wall,” said Mr. Schumer, standing beside Mrs. Pelosi for the televised response to the president’s address.

House Majority Whip James E. Clyburn promised that after the shutdown ended, there would be new spending on a high-tech, invisible “smart wall” on the border.

“I would love to spend money on what I call a ‘smart wall,’ rather than a concrete edifice. We cannot protect the border with concrete. We can protect the border using the technology that’s available to us to wall off intrusions by using that technology,” the South Carolina Democrat said on CNN.

• Dave Boyer contributed to this report.