WASHINGTON — Defying the Obama administration’s threat of a veto, the Senate on Tuesday voted to increase the role of the military in imprisoning suspected members of Al Qaeda and its allies — including people arrested inside the United States.

By a vote of 61 to 37, the Senate turned back an effort to strip a major military bill of a set of disputed provisions affecting the handling of terrorism cases. While the legislation still has several steps to go, the vote makes it likely that Congress will eventually send to President Obama’s desk a bill that contains detainee-related provisions his national-security team has said are unacceptable.

The most disputed provision would require the government to place into military custody any suspected member of Al Qaeda or one of its allies connected to a plot against the United States or its allies. The provision would exempt American citizens, but would otherwise extend to arrests on United States soil. The executive branch could issue a waiver and keep such a prisoner in the civilian system.

A related provision would create a federal statute saying the government has the legal authority to keep people suspected of terrorism in military custody, indefinitely and without trial. It contains no exception for American citizens. It is intended to bolster the authorization to use military force against the perpetrators of the terrorist attacks of Sept. 11, 2001, which lawmakers enacted a decade ago.