A $39.7 billion budget for the Department of Homeland Security stalled in Congress on Monday over Republican-authored provisions to block any spending on President Obama’s immigration orders. (Video: Reuters)

Monday passed without a deal to fund the Department of Homeland Security, bringing the agency five days from a partial shutdown as Republicans try to block President Obama’s plans for shielding millions of undocumented immigrants from deportation.

The department will run out of money by Sunday unless Congress grants a new round of DHS appropriations by then. Let’s examine what a lapse in funding would mean for the organization.

RELATED: Why Congress doesn’t need to shut down Homeland Security this week

In the event of a shutdown, work continues for federal employees whose jobs are “necessary for safety of life and protection of property.” At Homeland Security, that includes personnel who patrol borders, inspect cargo and screen airport passengers, among a long list of other duties.

The remaining DHS workforce, known as non-exempt, would be furloughed, or forced off the job until Congress grants new funding.

Most of Homeland Security’s roughly 240,000 employees would be exempt in the event of a shutdown, due to the nature of their work. The department has said it will send home about 13 percent of its workforce, or 30,000 employees, if its funding lapses.

Furloughed workers — many of whom would be administrative staff — would stay home without pay until the shutdown ends, while exempt personnel would work with no compensation until that time.

Homeland Security Secretary Jeh Johnson delivered remarks regarding funding for the Department of Homeland Security, saying the Congress's failure to pass a funding bill would "amount to a serious disruption in our [DHS's] ability to protect the homeland." (Video: AP)

In the past, Congress has always granted back pay to federal employees after shutdowns. The same could be expected if DHS closes this year, but there are no guarantees.

Homeland Security, created after the 9/11 terrorist attacks, encompasses a wide range of agencies, including Customs and Border Protection, the Secret Service, the Coast Guard, the Federal Emergency Management Agency and the Transportation Security Administration.

Below is a list of DHS programs that were exempt from furloughs during the 2013 shutdown, based on a White House planning document.

You’ll notice that some programs continued operating even though they aren’t directly involved in “safety of life and protection of property.” That’s because they derive a significant portion of their budgets, sometimes as much as 95 percent, from sources other than Congress, such as fees.

RELATED: Why Congress can’t stop a federal hiring blitz tied to Obama’s immigration actions

A lapse in Homeland Security funding would affect more than workers’ paychecks. It would also force the department to halt hiring, employee training, processing of grants for state and local governments, and the E-Verify program, which helps employers confirm work eligibility.

The length of the shutdown would depend on how long Congress and the president take to agree on a DHS funding bill. Senate Republicans on Monday failed for the fourth time to overcome a Democratic filibuster of a measure that would inject money into the department but block Obama’s immigration actions.

Last week, a federal judged ordered a temporary hold on the president’s immigration plans. The Obama administration plans to appeal the decision.