Lawmakers are lashing out at the Obama administration for vetoing on Thursday a major defense spending bill that would provide the U.S. military with a pay raise.

While the House and Senate approved the massive defense bill known as the National Defense Authorization Act (NDAA), Obama vetoed it Thursday afternoon over a passage that would prevent terrorist detainees held at Guantanamo Bay from being transferred to the United States.

The NDAA also provides funding to most American military operations and defense efforts across the globe, including efforts to battle the Islamic State (IS) and other terrorist groups. Future funding for these operations will be stalled until Obama decides to approve the legislation.

The White House and congressional Democrats also have opposed the legislation because it would provide an additional $38 billion boost to U.S. defense efforts, which they claim surpasses previously approved budgets caps.

Rep. Vern Buchanan (R., Fla.) slammed the White House and Obama in a statement to the Washington Free Beacon.

"During these perilous times, the last thing we need is uncertainty surrounding the funding of our national security priorities," Buchanan said. "Our soldiers are not props for a press release—they deserve to be properly funded and supported by our country."

UPDATE 3:50 P.M.: Sen. John McCain (R., Ariz.) and Rep. Mac Thornberry (R., Texas), chairmen of the Senate and House Armed Services Committee, declared Obama's veto as "reckless" and "dangerous."

"President Obama’s veto of the National Defense Authorization Act is not only unprecedented, but it is reckless, cynical, and downright dangerous," the lawmakers said in a joint statement. "Never before has an American president used the bill that provides pay and support to our troops and their families as political leverage for his domestic agenda."

"The American people, and most importantly, the men and women in uniform deployed to fight in dangerous war zones around the world, expect more from their Commander-in-Chief," the said.

Obama should not be playing political games during a time of such great unrest across the globe, the lawmakers added.

"At a time when crises around the world have never been greater, and when U.S. global leadership has never been weaker, this veto will only intensify the challenges we face while putting vital missions in danger," the said.

The NDAA fulfills Obama's own demands about funding for defense priorities and provides the military and troops with resources necessary to protect America and allies across the world, the added.

"It gives our service members new tools to battle ISIL and al Qaeda, and it provides the Ukrainians the lethal assistance they need to combat Russian aggression," said McCain and Thornberry.

UPDATE 4:05 P.M.: Sen. Dan Coats (R., Ind.) also criticized President Obama's veto in a statement.

"Today, our country faces the most distributed and diverse terrorist threats since 2001, yet President Obama is playing politics with our national security," Coats said. "The president is willing to veto a bipartisan bill in order to push Congress for increased spending on items unrelated to this legislation."