President Donald Trump has signed a bill that temporarily opens the federal government for three weeks, ending the longest shutdown in U.S. history at 35 days. 

The White House says Trump signed the measure after the Senate and House each passed it Friday. 

Trump backed down from his demand that Congress provide more border wall money before federal agencies get back to work. But he warns that the government could shut down again "if we don't get a fair deal from Congress." 

He is also holding out the possibility of taking executive action.

The agreement to open the government came as about 800,000 federal employees missed their second consecutive paycheck.

As part of the deal, a bipartisan committee of House and Senate lawmakers is being formed to review border security recommendations.