The $1.4 trillion spending package, which includes a boost in domestic spending backed by Democrats as well as an increase in military spending favored by Republicans, will keep the government funded through Sept. 30, 2020.
Trump signed the legislation aboard Air Force One on his way from the White House to his Mar-a-Lago resort in Florida, where he'll be spending the holidays.
Funding for the wall was the main sticking point in last year's budget impasse, which led to a 35-day partial government shutdown. Today's legislation avoids a repeat of that scenario.
The bill will add approximately $400 billion to the deficit over the next 10 years.