PITTSBURGH — The United Electrical, Radio and Machine Workers of America endorsed Bernie Sanders on Monday, offering one of the few endorsements by a national union as Democratic presidential candidates continue to court labor’s support.

The union, which represents some 35,000 workers, voted to back Mr. Sanders directly after he spoke at its national convention in Pittsburgh, where he made a boisterous appeal for its help in the race.

“The UE is about what our campaign is about,” said Mr. Sanders, who was greeted onstage with raucous cheers as he peppered his comments with the phrase “brothers and sisters.’’

“Having traveled this country, there is growing disgust on the part of ordinary Americans at the corporate greed that we see,” he said. “That greed is an illness — it is an addiction. And if the corporate C.E.O.s don’t get the treatment that they need, we will provide the treatment for them.”