Former Homeland Security Secretary Janet Napolitano, photographed on Oct. 31, 2012, at a Washington Post Live summit on cybersecurity. (Washington Post)

The three former heads of the Department of Homeland Security are warning Congress not to hold up funding for the sprawling department as lawmakers continue fighting over immigration reform.

The three former secretaries of homeland security -- two Republicans and one Democrat -- say in a letter obtained by The Washington Post that a prolonged fight could risk national security at a time of sustained threats from terrorist groups. Their message comes as the U.S. Senate is expected to begin debating a DHS spending bill in the coming days.

How to fund the department has become a proxy fight in the years-long feud between President Obama and congressional Republicans over how to deal with illegal immigration and border security. Current homeland security funding expires on Feb. 27 as part of an agreement passed last year that was designed to give Republicans more time to respond to Obama's decision to change the nation's immigration policy by executive action.

The House passed a new spending bill earlier this month that would fund the department through the end of the fiscal year in September. But the bill also essentially repeals significant changes in immigration made by Obama since the start of his presidency, including instructions to federal immigration officers to focus on deporting criminal illegal immigrants or repeat offenders and his 2012 Deferred Action for Childhood Arrivals program, the one that grants temporary legal status to hundreds of thousands of "dreamers."

On Wednesday, House Speaker John A. Boehner (R-Ohio) also said that he is working on filing a lawsuit to challenge Obama's executive actions.

Prospects for the spending bill remain less certain in the Senate. While Republicans control 54 seats, they'll need at least 60 votes for the spending bill to clear procedural hurdles and pass. Majority Leader Mitch McConnell (R-Ky.) said this week that the Senate will take up the spending bill in the coming days, likely next week, but he hasn't signaled yet how he plans to proceed and secure Democratic support.

All 46 members of the Senate Democratic caucus warned McConnell this week that they will not support the House-written spending bill. Citing recent terrorist attacks in Paris and the continued threats of the Islamic State terror group, "DHS funding should not be tied to divisive political issues that could jeopardize this critical funding," the senators wrote in a letter to McConnell.

Former Homeland Security Secretary Michael Chertoff. (Image via PostTV)

On Thursday, McConnell and Boehner are expected to receive a similar message -- but this time from Republicans Tom Ridge and Michael Chertoff and Democrat Janet Napolitano.

"We do not question your desire to have a larger debate about the nation's immigration laws. However, we cannot emphasize enough that the DHS's responsibilities are much broader than its responsibility to oversee the federal immigration agencies and to protect our borders," they write in a copy of the letter obtained by The Washington Post. "And funding for the entire agency should not be put in jeopardy by the debate about immigration."

"It is imperative that we ensure that DHS is ready, willing and able to protect the American people," they add. "To that end, we urge you not to risk funding for the operations that protect every American and to pass a clean DHS funding bill."

The current homeland security secretary, Jeh C. Johnson, has repeatedly warned lawmakers about using his department's spending bill to make a point about immigration. He was spotted on Capitol Hill last week meeting with several senior lawmakers to make his point.

The partnership between Johnson's predecessors isn't new: They've appeared together at public events and advocated through op-eds and other media appearances to protect department funding and to ask Congress to streamline oversight of the department.

Ridge was named the nation's first homeland security secretary in 2003 when the department was established by President George W. Bush. Chertoff, a former federal judge, held the job from 2005 until the end of the Bush administration. Napolitano, a former governor of Arizona, was tapped as Obama's first DHS secretary and served from 2009 to 2013.