Washington (CNN) The House of Representatives on Thursday passed a bill to temporarily extend funding for the federal government and avert a shutdown at the end of the month.

The bill, approved 301-123, will extend funding at current levels with limited exceptions through November 21, potentially setting up an end-of-the-year showdown over government spending that could drag into the holiday season.

The Senate will need to pass the bill next for it to make it to President Donald Trump's desk for his signature.

"We must pass a continuing resolution to avoid another government shutdown," House Appropriations Chairwoman Nita Lowey, a Democrat from New York, said in a statement.

Congressional leaders had hoped to complete negotiations earlier this week, but several sticking points arose, including the Commodity Credit Corp., the fund Trump has used to distribute billions of dollars in bailouts to farmers suffering from the effects of his trade war with China.

Read More