Democrats are bringing enhanced oversight to the Department of Homeland Security to more closely monitor how immigrants are treated in federal custody on the border and in detention facilities across the country.

The defense spending bill, which includes money for the DHS to operate for the rest of fiscal 2020, mandates the department create an independent Immigration Detention Ombudsman office to track concerns related to immigrants who are being held by Customs and Border Protection or by Immigration and Customs Enforcement. CBP is supposed to hold people, primarily those arrested for illegally crossing the border, no more than three days, while ICE may detain families and adults for weeks to months.

“We have real concerns about the situation at the border, and this is prompted by that as a way of trying to make sure these facilities are upholding the standards we expect them to follow,” a House Democratic aide told the Washington Examiner.

The aide said Rep. Lucille Roybal-Allard, chairwoman of the House appropriations subcommittee on homeland security, was the “main mover” on the measure. Roybal-Allard, a California Democrat, originally funded the office at $20 million, but it was cut by half during negotiations with the Senate.

The ombudsman office will be the point of contact for complaints on conditions at immigration detention facilities, including any from lawmakers. It will “establish and administer an independent, neutral, and confidential process to receive, investigate, resolve, and provide redress” for all complaints, the bill states.

It can refer some cases to the DHS Office of the Inspector General for additional review or Citizenship and Immigration Services if it finds someone in custody may not have to be deported. The ombudsman and staff will also be able to tour facilities without notice.

The ombudsman will report directly to acting DHS Secretary Chad Wolf, who will also select the person for the job. The new official does not require Senate confirmation but must be a “senior official with a background in civil rights enforcement, civil detention care and custody, and immigration law,” according to the bill.

In a sign of bipartisan backing for the office, Senate Homeland Security and Governmental Affairs Chairman Ron Johnson praised it in comments to reporters on Capitol Hill this week. “As chairman of this committee that’s engaged in oversight, I appreciate oversight — I appreciate information data,” said Johnson, a Republican from Wisconsin. “I think transparency is generally good for the process. And, truthfully, managers and other government officials ought to appreciate that transparency, because it will drive them to do a better job.”

CBP and ICE were criticized by lawmakers and migrant advocacy groups over the past year for people in overcrowded conditions and for not providing adequate medical treatment to some. In one case reported by ProPublica earlier this month, a 16-year-old boy who died while in Border Patrol custody in McAllen, Texas, was not found by officials until hours after he collapsed in his cell. The boy, Carlos Gregorio Hernandez Vasquez, had been diagnosed with the flu and a high fever while at the facility but had not been referred to the hospital for treatment.

Funding for CBP and ICE remained similar to last year despite the Trump administration’s request for increases for each agency. The bill requires ICE to end contracts with private detention facility operators who have failed two consecutive inspections by the agency.