President Donald Trump

 President Donald Trump has signed a government funding bill that ends a record 43-day shutdown. (Photo: AP)

WASHINGTON (AP) — President Donald Trump signed a government funding bill Wednesday night, ending a record 43-day shutdown that caused financial stress for federal workers who went without paychecks, stranded scores of travelers at airports and generated long lines at some food banks.

The shutdown magnified partisan divisions in Washington as Trump took unprecedented unilateral actions — including canceling projects and trying to fire federal workers — to pressure Democrats into relenting on their demands.

The Republican president blamed the situation on Democrats and suggested voters shouldn’t reward the party during next year’s midterm elections.

“So I just want to tell the American people, you should not forget this,” Trump said. “When we come up to midterms and other things, don’t forget what they’ve done to our country.”

The signing ceremony came just hours after the House passed the measure on a mostly party-line vote of 222-209. The Senate had already passed the measure Monday.