WASHINGTON — The House voted on Thursday to approve a Republican-backed bill that would prohibit the National Labor Relations Board from trying to block Boeing from operating a new $750 million aircraft assembly line in South Carolina. The largely party-line vote was 238 to 186.

Republicans denounced the labor board’s case against Boeing, asserting that the board was overreaching its authority and should not be dictating where companies can locate their operations. But many Democrats and union leaders condemned the legislation, arguing that it undercut an independent federal agency and favored Boeing, a potent lobbying force and prominent political donor.

Under the bill, an unusual effort to curb a federal agency’s actions in a pending case, the labor board would be barred from seeking to have an employer shut, transfer or relocate employment or operations “under any circumstances.”

The bill, called the “Protecting Jobs from Government Interference Act,” is expected to face a battle in the Democratic-controlled Senate. In the House vote, the partisan divide was clear: only eight Democrats voted for the bill and only seven Republicans voted against.