The chamber voted down the amendment, sponsored by Sen. John McCainJohn McCainSenate committee to vote Monday on Tillerson Trump fails to mention Clinton in inaugural address Hillary Clinton under microscope at inauguration MORE (R-Ariz.), in a vote of 43-54. The vote had a 60-vote threshold.

Prior to the amendment's defeat McCain blamed the pharmaceutical industry for pressuring the Senate to defeat the legislation.

"In a normal world this would probably require a voice vote, but what we're about to see is the incredible influence of the special interests, particularly pharma, here in Washington, that keeps people who cannot — that have to make a choice between eating and medicine," McCain said. "So what you're about to see is the reason for the cynicism that people have for the way we do things in Washington. Pharma, one of the most powerful lobbies in Washington, will exert its influence again at the expense of average, low income Americans who, again, will have to choose between medication and eating."

The vote came during a series of votes on amendments to a Food and Drug Administration reauthorization bill on Thursday. Thirty Republicans voted against the amendment.

Sen. Charles GrassleyChuck GrassleyGOP senator: Trump budget chief could face confirmation 'problems' Jeff Sessions will protect life Justice, FBI to be investigated over Clinton probes MORE (R-Iowa), a long-time supporter of allowing drug importation from Canada, spoke in favor of the McCain language Thursday morning.

"I have always considered drug importation a free-trade issue," Grassley said in his prepared remarks. "Imports create competition and keep domestic industry more responsive to consumers.

"If Americans could legally and safely access prescription drugs outside the United States, then drug companies will be forced to re-evaluate their pricing strategies," he added. "They'd no longer be able to gouge American consumers by making them pay more than their fair share of the high cost of research and development."

A border-state senator, Olympia Snowe (R-Maine), agreed that McCain's amendment would help reduce costs for Americans.

"American consumers are paying 50 percent higher costs for the same prescription drugs than Canadians do," she said. "We know for a fact that allowing drug importation generates considerable cost savings to the government, to individuals and businesses that provide health insurance coverage to their employees."

But Sen. Mike EnziMike EnziDem senator: DeVos ‘sends shivers down the spine’ Trump Education pick: States should decide on allowing guns in schools Schumer puts GOP on notice over ObamaCare repeal MORE (R-Wyo.) argued that the amendment would put the safety of Americans at risk, since it would let Canadian Internet pharmacies sell into the United States without any of the approval processes applied to U.S. drugs. "We're not talking about bus trips of seniors to reputable pharmacies right across the border," Enzi said.

Enzi added that drugs from Canada would actually be from anywhere around the world, as Canadian pharmacies have acknowledged that they get most of their drugs from overseas.

"Drugs that supposedly come from Canada can really come from any place in the world and then are shipped from Canada," he said.

Shortly after the McCain amendment's defeat, the Senate defeated one sponsored by Sen. Bernie SandersBernie SandersHillary gives Bernie cool reception at Trump inaugural lunch The Hill's 12:30 Report Sanders: This is a 'tough day for millions of Americans' MORE (I-Vt.) which takes away a drug company's exclusive marketing rights if that company is found guilty of fraud. The Senate defeated Sanders's bill 9 to 88.

The Senate also tabled an amendment by Sen. Dick DurbinDick DurbinJustice requires higher standard than Sessions Warren burns Mnuchin over failure to disclose assets Trump Treasury pick to defend foreclosure record MORE (D-Ill.) which would have established a requirement that dietary supplement manufacturers to register with the FDA. 

—This story was updated at 3:14 p.m.