A bipartisan committee of House and Senate lawmakers met for the first time on Wednesday afternoon, aiming to work out a deal on border security. But Democrats and Republicans both dug in over whether new physical barriers are a necessary element.

Though both sides expressed optimism they could reach a deal that would stop the government from shutting down again, Democrats dismissed president Trump's call for a border wall while Republicans argued that a barrier on the U.S.-Mexico border is needed in some places.

TRUMP RENEWS CALL FOR WALL AS CONGRESS HUDDLES ON ELUSIVE BORDER SOLUTION

“Smart border security is not overly reliant on physical barriers, which the Trump administration has failed to demonstrate are cost-effective compared to better technology and more personnel,” said House Appropriations Committee Chairwoman Nita Lowey, D-N.Y., who is chairing the conference committee.

Senate Appropriations Chairman Richard Shelby, R-Ala., argued that smart technology alone “does not actually stop anyone" from crossing into the U.S. illegally.

“Our Border Patrol tells us they need physical barriers to help them do their job,” Shelby said.

Others on the committee include Rep. Kay Granger, R-Texas, and Sen. Patrick Leahy, D-Vt; along with chairs and ranking members of both the House and Senate Homeland Security Appropriations subcommittees. After lawmakers delivered opening remarks on Wednesday, the lawmakers adjourned, kicking negotiations behind the scenes.

House Democrats on the committee have proposed reducing the number of so-called "detention beds" used by Immigration and Customs Enforcement (ICE) to hold suspected criminal aliens. The proposal also calls for the hiring of additional Homeland Security Investigations (HSI) agents to focus on "high priority law enforcement areas," including drug smuggling and gang crime.

The meetings come in the wake of the House and Senate agreeing to “go to conference” on a bill funding the Department of Homeland Security, which would oversee construction of a wall and has jurisdiction over border security.

SARAH SANDERS: TRUMP OPENED GOVERNMENT BECAUSE DEMS 'SIGNALED' THEY'RE WILLING TO MAKE BORDER DEAL

The longest government shutdown in U.S. history ended last Friday when Trump signed a stopgap spending bill. But it only provides funding through Feb. 15 and did not include any funding for a border wall.

To avoid another shutdown, lawmakers and the administration will have to reach an agreement in that timeframe.

Lawmakers on the committee could potentially come to an agreement on a border security deal as they have done in the past, but whether Trump will support it remains to be seen.

Earlier Wednesday, Trump renewed his call for a border wall to be included in a final government spending package, warning congressional negotiators that they are “wasting their time” if they don't factor in that funding.

“If the committee of Republicans and Democrats now meeting on Border Security is not discussing or contemplating a Wall or Physical Barrier, they are Wasting their time!” Trump tweeted early Wednesday. The message came as lawmakers from both chambers were preparing to meet Wednesday afternoon as part of what's called a conference committee to hash out an agreement on border security spending -- hoping to avoid another shutdown.

Trump took heat from the right for even agreeing to the stopgap bill, but is now reiterating his demand for a border wall or barrier. The original standoff was triggered after he requested $5.7 billion for border security and barrier funding, and Democrats vowed to block any spending package that included money for a wall.

Senate Majority Leader Mitch McConnell, R-Ky., said he was “for whatever works that would prevent the level of dysfunction we’ve seen on full display here the last month and also doesn’t bring about a view on the president’s part that he needs to declare a national emergency.”

Meanwhile, some Democrats have said they support a plan for border security that includes some sort of fencing or physical structure in some areas where it's deemed necessary.

"We've consistently said that we do not support a medieval border wall from sea to shining sea," said Rep. Hakeem Jeffries, D-N.Y. "However, we are able to support fencing where it makes sense, but it should be done in an evidence-based fashion."

Fox News’ Chad Pergram, Brooke Singman and The Associated Press contributed to this report.