Mayor Marion Barry declined yesterday to begin collective bargaining over this year's wages with the 14 unions that represent city workers, saying that an order requiring him to do so was legally invalid.

His decision sets up a confrontation with the unions, whose members are planning a protest demonstration outside the District Building this afternoon. Their leaders have encouraged talk of job slowdowns or other tactics short of a strike to force the major's hand. A strike would be illegal.

"They can demonstrate," Barry said at a news conference. "This is America. They have freedom of speech. But you don't have collective bargaining in the streets. I don't conduct the city's business in demonstrations."

Barry's announcement that he would not negotiate with the unions this year was in response to a ruling Oct. 10 by the city's Public Employee Relations Board (PERB) directing him to do so. The PERB, headed by former U.S. Secretary of Labor Willard Wirtz, granted a petition by the unions to certify them all together, for this year only, as a "unit" for bargaining purposes that would meet the requirements of the city's new merit personnel act. That act set up the bargaining process and created the PERB to monitor it, but specified that bargaining could begin only after PERB certified units of workers in similar occupations -- not necessarily their unions -- to represent the labor side.

Barry distributed yesterday an opinion by Corporation Counsel Judith Rogers, the city's chief legal officer, saying that decision by the PERB was "contrary to law" and exceeded the PERB's statutory authority.

Rogers said there were several legal flaws in the PERB ruling. She said the law requires preliminary steps such as preparation of a pay comparability study before bargaining can begin and that the major, by formally submitting a 1981 pay proposal to the City Council before PERB ruled, had preempted the field because that procedure and collective bargaining cannot be undertaken simultaneously.

"I believe totally in collective bargaining," Barry said, "but I must do it within the framework of the law." He sent a letter asking that PERB reconsider its ruling; if the PERB declines to do so, he wrote, "I deem it to be in the best interests of the District government and its workers, as well as the citizens of this community, to seek a judicial declaration that the Board's opinion and ruling is null and void." In other words, he will go to court -- a process that could take so long it would render the issue of this year's wages moot by the time it was resolved.

The major said he would go ahead with a 5 percent cost-of-living increase for the city's 31,000 emmployes, retroactive to Oct. 1. He urged the unions to accept this "money in the pockets of the workers" and turn their attention to negotiating for the 1982 fiscal year, which begins 11 months from now. But that is precisely the offer the unions rejected when they went to the PERB with their petition. They have been demanding that the mayor either negotiate for this year or grant them a pay increase of 9.1 percent, equivalent to what federal workers received.

Barry said that to do that he would either have to lay off 3,400 workers or raise $29 million through new taxes, and he was "not about to propose" either. His course of action, he said, "is legal and it gets money that the pockets of our workers immediately." To negotiate as the unions are demanding would be illegal and could take months, he said. "I call upon the leadership of the unions to agree with me, to join with me in getting this increase and recognize that it's too late to bargain for '81."

A.N. Zwerdling, the lawyer for the coalition of unions, said he found it "hard to understand why engaging in collective bargaining with certified units violates the law requiring collective bargaining." But he would not say what the unions' course of action would be, possibly because there are signs of a crack in the coalition. Some unions, especially those representing police officers and firefighters, have hinted that they may break ranks and attempt to bargain on their own.