(Bloomberg) -- Boeing Co. technicians voted to form the first collective bargaining unit at the planemaker’s factory in South Carolina, scoring a rare victory for organized labor in a state traditionally hostile to unions.

The “micro unit” will represent more than 170 flight-line workers, a small subset of the 7,000 or so mechanics who build Boeing 787 Dreamliners in North Charleston. Even so, the result gives the International Association of Machinists and Aerospace Workers a foothold in a so-called right-to-work state. Boeing has vowed to challenge the election, which it contended violates U.S. labor law.

The union victory marked a turnabout in a long-running struggle between Boeing’s management and the Machinists, with the South Carolina plant a crucial battleground. An attempt to organize the factory last year was rejected by 74 percent of workers, while a 2015 campaign fizzled amid an anti-union barrage led by then-Governor Nikki Haley.

Boeing decided to build a new final assembly line for its Dreamliners in South Carolina after a Machinists strike halted work at its traditional Puget Sound, Washington, manufacturing base in 2008. While the Chicago-based company builds only 787s on its campus adjacent to Charleston’s airport, the site is also a contender for a new midrange jet family that Boeing is considering.

To contact the reporters on this story: Julie Johnsson in Chicago at jjohnsson@bloomberg.net;Jaclyn Diaz in Washington at jdiaz167@bloomberg.net

To contact the editors responsible for this story: Brendan Case at bcase4@bloomberg.net, Tony Robinson

©2018 Bloomberg L.P.