Homeland Security John Kelly slammed Democrats and the media for "rejoicing" in the fact that money for President Trump's wall along the border with Mexico isn't in the omnibus spending bill.

Kelly said the spending bill, which if passed before Friday will fund the government until the end of September, represents the biggest investment in border security in a decade. However, Kelly's ire was piqued by Democrats, though he didn't mention the opposition party by name, who celebrated that funding for the wall was not a part of that investment.

"Frankly, I am shocked at the behavior of some individuals in public service or public office … they're rejoicing in that the wall will be slower to be built and our southwest border will be less secure than it could be," Kelly said.

Trump threatened to shut down the government last week over funding for his border wall, but eventually backed off that idea in order to fight for money in the fall. Trump wanted north of $1 billion in the bill to kick-start construction of the wall.

During the election, Trump famously claimed that he would build a wall along the border and get Mexico to pay for it. He has since claimed the American taxpayer would have to do the initial investment and then Mexico would pay the United States back for it.

White House budget director Mick Mulvaney said there will be some construction of new, higher border wall in areas where there is existing steel fencing. The spending bill also calls for the construction of levee barriers along rivers.

Kelly also defended the agents of Immigration and Customs Enforcement, which has been criticized for some deportations and new policies in recent months.

"There are many who owe them an apology … and frankly many in the media, for how they disrespect them, disrespect them for what they do and how they serve us every day," he said.