The Trump International Hotels in Las Vegas and Washington, D.C., agreed Wednesday to a union contract with their workers, ending several months of labor disputes that became a thorn in the side of President-elect Donald Trump during the presidential campaign. Both hotels are co-owned by Trump.

"The agreement speaks volumes about the hotel's commitment to its employees and the value they place on their relationship with our organization," said John Boardman, President of UNITE HERE Local 25, which will represent the D.C. workers. "We look forward to pursuing a mutually productive partnership with Trump International Hotel Washington, D.C."

Unite Here's Las Vegas affiliate, Culinary Workers Union Local 226, will represent the Nevada workers. "We are pleased to have a strong union contract that protects workers," said spokeswoman Bethany Khan, according to the Las Vegas Sun.

"We both desire to ensure outstanding jobs for the employees, while also enabling the hotel to operate successfully in a competitive environment, and to establish a reputation as one of the finest hotels in the world," said Trump Hotels CEO Eric Danizger.

The agreements followed a long-running fight to organize the workers, especially in Las Vegas. Unite Here, which has a strong presence in Nevada, petitioned to represent the hotel's workers in June 2015. An election was held last year, and the union won 53 percent of the workers who voted. The hotel claimed fraud and filed objections less than two weeks later. Last month, the National Labor Relations Board, the main federal labor law enforcement agency, rejected its claim and ordered it to bargain with the union.

The D.C. hotel opened in September.