A National Labor Relations Board judge ruled on Tuesday that Starbucks had illegally fired three baristas and otherwise violated federal labor laws in seeking to beat back unionization efforts at several of its Manhattan cafes.

The administrative law judge, Mindy E. Landow, found that Starbucks had also broken the law by issuing negative job evaluations to union supporters and prohibiting employees from discussing the union even though the employees were allowed to discuss other subjects not related to work.

“The judge’s ruling shows that this company has trampled on workers’ rights to organize a labor union,” said one of the fired baristas, Daniel Gross, who is a longtime leader of the effort by the Industrial Workers of the World to unionize Starbucks workers in New York, Minnesota, Michigan and other states.

Judge Landow ordered that Mr. Gross and the two other baristas be reinstated to their jobs and receive back wages. She also ordered Starbucks to pledge to end what she said was discriminatory treatment toward workers who supported the union at four of its Manhattan shops: 200 Madison Avenue at 36th Street, 145 Second Avenue at 9th Street, 15 Union Square East and 116 East 57th Street.