Ending a two-week standoff, freshman Sen. Rand Paul agreed to lift his hold on a bill extending aid to thousands of elderly and disabled refugees living in the United States.

The Kentucky Republican allowed the bipartisan bill to advance after Democratic leaders promised to hold a congressional hearing into how individuals are selected for refugee status and request an investigation into why two terrorism suspects were admitted to the U.S. through a refugee program, an aide said.

The Senate passed the $36 million funding extension Monday night by a voice vote, sending the bill to the House. But the legislation could face additional delays: A House Ways and Means Committee spokesman said the bill must originate in the House since it contains a revenue provision.

The assistance, known as Supplemental Security Income, expired Sept. 30.

On Monday, Paul also lifted a hold on a separate bill that calls for tougher oil and gas pipeline safety rules in the wake of last year’s deadly natural gas pipeline explosion in San Bruno, Calif. He’s added language to the bill to make sure older pipelines have to meet the same testing requirements as newer pipelines, among other technical changes.

Paul blocked the refugee aid bill over concerns the funding could be used to help domestic terrorists. Two Iraqi-born terrorism suspects, who came to the United States through a refugee program and were receiving welfare benefits, were arrested this year in Paul’s hometown of Bowling Green, Ky.

Democratic aides have insisted those individuals, Waad Ramadan Alwan and Mohanad Shareef Hammadi, received refugee “cash assistance” that was unrelated to the SSI program.

“Taxpayer-funded benefits to non-citizens is a luxury program afforded to refugees and managed so poorly that some of its beneficiaries have been found to be threats to the United States,” Paul said in a statement.

“I cannot in good faith allow this bill to pass without first addressing the management of this program and ensure we are not supporting terrorists in our own backyards with tax dollars.”

As part of the agreement with Paul, Sen. Chuck Schumer (D-N.Y.), the bill’s author and chairman of the Senate Judiciary Committee’s immigration panel, will hold an oversight hearing examining refugee resettlement in the United States. Paul will be among those testifying. And Schumer and Paul will jointly request the inspectors general at the Homeland Security, State and Health and Human Services departments investigate why the Iraqi terrorism suspects were allowed to enter the country.

“This took longer than it should have, but we are glad to reach a bipartisan agreement to extend this assistance to disabled refugees,” Schumer said in a statement. “Now it is time for the House to act so these individuals don’t have to wait any longer.”

The SSI legislation extends funding for about 5,600 elderly and disabled refugees from war-torn regions of the world, including Sierra Leone, Iraq and Afghanistan.

Based on an earlier deal worked out with Sen. Tom Coburn (R-Okla.), the $36 million in aid will be offset with revenue generated by a new $30 fee for individuals applying to enter the country through a visa lottery program. The fee is expected to more than pay for the refugee aid, cutting the deficit by $24 million.