WASHINGTON — Democrats are losing some skirmishes over the Department of Homeland Security, but many feel they are winning a political war that will haunt Republicans in 2016 and beyond.

Democrats lacked the votes Friday to force Republicans to fund the department for a year with no strings. Still, even some Republicans say party leaders are on a perilous path with a very public ideological struggle only highlighting the GOP’s inability to pass contested legislation and possibly worsening its weak relationship with Hispanic voters.

Worst of all, numerous lawmakers said, Republican leaders have offered no plausible scenario for a successful ending, so they simply are delaying an almost certain and embarrassing defeat.

Conservatives defend their doggedness. They say they courageously are keeping promises to oppose President Barack Obama’s liberalization of deportation policies, which they consider unconstitutional. Several said their constituents support their stand, while others said the issue transcends politics.

As a deadline fast approached Friday night, the House agreed to extend the department’s funding for a week. But some in both parties said the Republicans were losing political ground.

“It’s bad policy and bad politics,” said Democratic Rep. Chris Van Hollen of Maryland, who once oversaw his party’s House campaigns. The short-term fix, he said, “doesn’t help the country, and it just shows that they’re incapable of governing” despite holding House and Senate majorities.

As for an important voting group in presidential elections, Van Hollen said: “Any effort to earn the support of Hispanic voters has been torpedoed by these antics.”

Some Republicans are nearly as pessimistic.

“Bad tactics yield bad outcomes,” GOP Rep. Charlie Dent of Pennsylvania told reporters. Republican leaders, he said, have engaged “in tactical malpractice, and at some point we’re going to vote on the negotiated Homeland Security appropriations bill,” a bipartisan plan that most Republicans oppose but cannot kill.

Weeks ago, Republicans embarked on a strategy that targeted Obama’s executive order protecting millions of immigrants from deportation. They voted to cut off the department’s money flow after Feb. 27 unless the order was rescinded.

But they never figured how to overcome Democratic delaying tactics in the Senate that, as many predicted, blocked the GOP plan. Stymied, Senate Republican leaders agreed to fund the department for the rest of the budget year, through September, and to deal separately with immigration.

House Republicans rejected that approach. Shortly before Friday’s midnight deadline, the House extended funding for a week without resolving the larger dispute.

“We all know how this is going to turn out,” said an exasperated Republican, Rep. Mike Simpson of Idaho. “Politically, it’s devastating.”

Democrats turned up the heat, saying short-term extensions will damage morale at the agency.

“It’s a staggering failure of leadership that will prolong this manufactured crisis of theirs and endanger the security of the American people,” said House Democratic leader Nancy Pelosi of California.

But Republican Rep. Trent Franks of Arizona said he and his fellow conservatives are taking a principled stand against Obama’s “unconstitutional” action. The president, he said, has forced lawmakers to choose between “potential short-term national security threats and almost inevitable long-term damage to the constitutional foundation of the nation.”

He and his allies will “do the right thing, even if it doesn’t make us look good,” Franks said.

Lawmakers from strongly Republican districts tend to closely track the fiercely conservative voters who can dominate GOP primary elections. Rep. Kenny Marchant of Texas said he tried to persuade some of his Dallas-area constituents that a federal judge’s order to freeze Obama’s move lessened the urgency to use Homeland Security funding as political leverage.

“But they don’t have the confidence back home that some of us do” about the likely longevity of the judge’s order, Marchant said.

He said his supporters see reversing Obama’s order as more important than preventing a partial and temporary funding lapse at Homeland Security. He noted that most agency employees are considered “essential” and would stay on the job.

After Obama won 71 percent of the Hispanic vote in 2012, a Republican National Committee-commissioned report said the party must embrace “comprehensive immigration reform” to win future elections, including the 2016 presidential contest.

Democrats say Republicans are heading in the wrong direction.

Pelosi hinted at possible Democratic campaign themes next year when she said of the funding fight: “This crisis exists only because Republicans prioritize anti-immigrant extremism over the safety of the American people.”

Republican Rep. Peter King of New York said his party’s wounds are self-inflicted.

“Politically it’s going to kill us,” he said of conservatives’ demands to link Homeland Security funding with Obama’s immigration policy. “Morally, you’re equating an immigration order with the lives of American citizens.”

“I’ve had it with this self-righteous delusional wing of the party that leads us over the cliff,” King said.