But he reversed his rhetoric today, blaming Democrats and warning that a shutdown “will last for a very long time.”

The deadline for lawmakers is imminent: At midnight, funding runs out for several federal agencies, including the Agriculture, Commerce and Homeland Security Departments. Here’s where things stand and how we got here. Above, the Capitol.

At the heart of this battle is the wall that Mr. Trump promised during the campaign. Nearly two years into his presidency, there’s no wall — but his supporters still want it, and his re-election could be at stake.

If funding does expire tonight, here’s what to expect. We’re following the latest developments and linking to our detailed coverage here.