Senate Republicans are pushing ahead with a 1,300-page funding bill that would give President Donald Trump the $5.7 billion he wants for an expansion of the southern border wall, grant temporary protections for "Dreamers" and finally end the longest government shutdown in history.

Democrats have called the bill dead on arrival, but only partly because it includes Trump's full request for wall funding. They say the protections for Dreamers are not nearly enough, and complain that the bill was stuffed with unrelated, anti-immigration measures that would dramatically expand immigration enforcement in the U.S. and cut back the ability of foreigners to request asylum.

Republicans call the bill a reasonable compromise to end the partial government shutdown that makes a sound investment toward border security. Democrats call it a "Trojan horse" that provides only short-term help for Dreamers in exchange for long-term threats against them.

A senior Department of Homeland Security official said on Tuesday that the bill, which was crafted by Senate Republicans with help from the Trump administration, was a "starting point" that is open for negotiation.

"We have no illusions that we have drafted the world’s first perfect piece of legislation, and we would be happy to have conversations with Democrats and anybody who would like to come to the table and talk about ways to improve this legislation and find a consensus to pass it," said the official, who spoke on condition of anonymity to brief reporters on the details of the bill.

As both sides debate the bill this week ahead of a possible vote in the Senate, here's a look at the key provisions in the Republican immigration bill:

Temporary reprieve for Dreamers

When he delivered a speech from the White House on Saturday, Trump said he was trying to "break the logjam" of the shutdown by giving temporary deportation protections to more than a million immigrants.

The first group would be roughly 700,000 Dreamers, undocumented immigrants brought to the country as children who have qualified for the Deferred Action for Childhood Arrivals Program, known as DACA. Trump tried to end the program in 2017, but was blocked by federal courts. The Supreme Court this week did not decide whether it will take the case, leaving DACA recipients in legal limbo.

The second group is more than 300,000 foreigners who have been legally living and working in the U.S. under Temporary Protected Status, many for more than two decades, as their countries recover from natural disasters and armed conflicts. Six countries, which represent 98 percent of the TPS population, have been cut from the program, each given a deadline to leave the U.S. That decision has also been blocked by federal courts, leaving TPS recipients in their own legal limbo.

Democrats have floated the idea of giving Trump money for his border wall as part of a deal that includes a pathway to citizenship for DACA and TPS recipients, but the Republican bill would only grant them "provisional protected status" for up to three years.

It costs $495 to renew one's DACA status, and the bill would require a similar payment for "provisional protected status." But the bill would add an additional $500 "security fee" that would be paid to the Department of Homeland Security.

The bill also places new requirements on recipients of the temporary protections, such as having an income higher than 125 percent of the federal poverty level and has not engaged in sexual harassment.

The temporary protections for DACA and TPS recipients are non-renewable, and both programs would end by the end of the three years.

New wall funding

At the core of the bill is Trump's long-standing request for $5.7 billion to build new barriers along the southern border and replace portions that are crumbling.

The request is a far cry from the coast-to-coast, 30-foot high, solid, concrete wall Trump promised during his presidential campaign. He has since changed his stance, saying rows of sleet slats are better suited to the rugged, 2,000-mile border so that Border Patrol agents can see between the slats to what's happening on the other side of the border.

The $5.7 billion would pay for 215 miles of barriers, about half of which would be considered "new." Homeland Security officials said much of the money would be spent to replace outdated and dilapidated walls in high-traffic areas, including the Rio Grande Valley in eastern Texas. The officials said about 100 miles of new barriers could be built in areas that currently have nothing.

Asylum overhaul

Trump has repeatedly warned about migrant caravans marching toward the border to "take advantage" of U.S. asylum laws, so the Republican bill offers a dramatic overhaul of that system.

Asylum is granted to foreigners who fear persecution in their home countries based on their race, religion, nationality, political beliefs or membership in a particular social group. Under U.S. law, foreigners can request asylum at ports of entry, or even if they enter the country illegally.

The Trump administration has tried to make several changes unilaterally to the asylum system that were blocked by federal courts. That includes proposals to bar victims of domestic abuse or gang violence from receiving asylum, and barring migrants who enter the country illegally from receiving asylum. But one change has survived: migrants who request asylum at ports of entry along the southern border must now remain in Mexico as their cases are decided.

The Republican bill would create new opportunities for asylum-seekers, but also add new restrictions.

The bill would create a program to allow Central American minors to apply for asylum in centers that would be built in Belize, Costa Rica, El Salvador, Guatemala, Honduras, Mexico, Nicaragua and Panama. That would allow them to learn their fate before making the treacherous journey north.

Such a program already existed, however, and was abolished by the Trump administration. The Central American Minors program, known as CAM, was created under the Obama administration when minors first started flooding the southwest border seeking asylum in 2014, but was terminated shortly after Trump assumed office in 2017.

The Republican bill would offset the new in-country application program by barring all Central American minors from applying for asylum at the U.S. border, with few exceptions.

The new program would take 240 days to start, and the asylum restrictions would go into effect immediately, meaning Central American minors would be forbidden from getting asylum for at least eight months, according to Greg Chen of the American Immigration Lawyers Association. The Homeland Security official said the "intention" of the bill would be for the new asylum-processing centers to open at the same time that the new restriction on applying for asylum at the U.S. border goes into effect.

The new asylum rules would also create new guidelines for determining who gets asylum. One notable change would require U.S. officials to decide whether granting asylum to each applicant would be "consistent with the national interest." Chen and other immigration advocates worried that change alone could lead to widespread denials.

The bill would also cap at 15,000 the number of minors who can receive asylum. Under current law, asylum admissions are not capped.

More enforcement, more jails

The $5.7 billion for new border barriers is just part of the $70 billion that the Department of Homeland Security would receive under the new bill.

That includes funding for 375 new Customs and Border Protection officers who man U.S. ports of entry and 750 new Border Patrol agents who patrol the regions in between those ports, according to a Senate Appropriations Committee summary of the bill.

Immigration and Customs Enforcement currently has about 44,000 beds to detain immigrants in government-owned and privately-operated detention centers, and the new bill would provide enough funding to increase that to 52,000 beds. ICE would also receive funding to hire an additional 2,000 agents around the country.

"Historically unprecedented and dramatic increases ... at a time when detention and enforcement budgets for ICE and CBP are already historically unprecedented," said Heidi Altman, director of policy at the National Immigrant Justice Center.