WASHINGTON — Senate leaders said on Friday night that they had reached a deal that would extend a payroll tax cut for two months — falling far short of the yearlong extension they had been seeking. The agreement would also speed the decision process for the construction of an oil pipeline from Canada to the Gulf Coast, a provision necessary to win over Republicans who opposed the tax break.

A senior administration officials said the deal announced Friday night met the test that President Obama had set out: that Congress would not go home without preventing a tax increase on 160 million Americans.

However, rank-and-file members of the House said on Friday that they were opposed to a short-term extension. Approval in that chamber, even with the provision on the Keystone XL pipeline, is no sure thing.

The agreement, on which a Senate vote is expected Saturday, would also allow jobless workers to continue receiving unemployment insurance benefits as permitted by current law for two months. For the same period, there would be no cut or increase in fees paid to doctors for treating Medicare patients. The cost of these items will be fully paid for, Congressional aides said.