United Parcel Service Inc.’s union ratified a five-year labor agreement for employees—even though a majority of members who voted turned it down.

The 54 percent “no” vote wasn’t enough to block the deal under union rules since less than half the membership turned out to cast ballots, the International Brotherhood of Teamsters said in an emailed statement. With such low participation, two thirds of workers would have had to oppose the deal for the rejection to be valid, the union said.

“Thus, the National Master Agreement has been ratified,” the Teamsters said.

The approval of the contract despite majority opposition raises the risk of a worsening clash between factions within the Teamsters, potentially stoking labor turmoil for UPS. The uncertainty comes as the courier is rushing to lower the cost of home deliveries and cash in on booming e-commerce. UPS is trying to keep costs competitive with nonunion rivals, including FedEx Corp. and Amazon.com Inc., which is starting its own…