In a major victory for organized labor in Missouri, Republicans failed Wednesday to override the Democratic governor’s veto of a bill that would have allowed workers who chose not to join unions to avoid paying fees.

House members voted 96 to 63 in favor of an override of Gov. Jay Nixon’s veto, 13 votes short of the two-thirds majority needed to send the bill to the Senate. But the outcome, cheered by union members, was not expected to end the state’s debate. So-called right-to-work policies have been enacted elsewhere in the Midwest, long a bastion of union organizing, and are poised to be a major issue in Missouri’s 2016 election for governor.

Business groups had supported the legislation, saying it would attract jobs to the state and let workers who did not want union services stop paying for them. Unions mobilized against the bill, saying nonunion workers benefited from agreements won through collective bargaining.

“Today’s bipartisan action by the legislature to uphold my veto of this divisive, anti-worker bill is a victory for workers, families and businesses here in Missouri and across the country,” Mr. Nixon said in a statement.