Updated

Senators narrowly averted the expiration of three provisions of the terrorism surveillance law known as the PATRIOT Act on Thursday, though freshman Sen. Rand Paul, R-Ky., scored a major victory, as well, in securing votes on two of his amendments.

It is rare for a freshman to block the proceedings of the august chamber, but Paul, an ophthalmologist with virtually no experience in politics until January, said he was taking a stand on "constitutional grounds."

With just hours to go before the midnight expiration deadline, senators agreed, 72-23, to a four-year extension of the law, but not before defeating Paul's amendments that would have tightened judicial oversight on access to bank records, as well as gun ownership records.

"We come here to Washington expecting these grand debates," Paul lectured his colleagues. "Instead, what happens so often is the votes are counted and recounted...and when they know they can beat me..then they allow the vote to come to the floor."

The amendment that caused the most angst, which would have imposed stricter judicial oversight on access to gun ownership records, nearly locking out law enforcement access, garnered only 10 votes of support in the end.

Defeat was a near certainty after Sen. Saxby Chambliss, top Republican on the Intelligence Committee, announced his opposition. Saying that probably "no one owns as many guns as I do," Chambliss declared that the Paul amendment could risk scuttling terrorism investigations and then read from a letter he said was authored by the National Rifle Association taking no position on the provision.

That freed up any nervous politicians to vote against Paul.

Still, it was this gun amendment that sparked a rare, stinging rebuke from Senate Majority Leader Harry Reid, D-Nev., on Wednesday night, who said the GOP senator was putting U.S. national security at risk.

Senate Judiciary Committee Chairman Patrick Leahy, D-Vt., expressed disappointment that he was shut out of the agreement. Leahy had an amendment (with Paul) that would have imposed more reporting requirements on the surveillance law.

The second amendment by Paul would have imposed tighter restrictions on access to financial institution records. It only received four votes in support.

"We need to be proud of the fact that it's none of your darn business what we're reading," Paul, a libertarian, preached to his colleagues. "You don't have to give up your liberty to catch terrorists...but what we did in our hysteria after 9/11 was give up our freedoms."

As for the expiring PATRIOT Act provisions, which the Intelligence Community has deemed critical to the fight against terrorists and to tracking intelligence leads found in the material seized in the raid on the now-deceased terrorist leader Usama bin Laden's compound, they include:

*The "lone-wolf" provision which allows law enforcement agents, with a judge's approval, to surveil a non-U.S. citizen suspected of terrorist activity but who is not a member of a terrorist organization.

*Roving wiretaps - used on suspected foreign agents who repeatedly switch cell phones and/or numbers.

*The so-called "library records" provision which allows the government to obtain a court order to seize business records relevant to a national security investigation.

The bill now heads to the House for passage later Thursday evening. It is then expected to be flown to the President, who is in France for the G-8 summit, for his signature.