D.C. Mayor Marion Barry claimed credit yesterday for ending the 23-day strike by Washington teachers and accused the city school board of taking a "very cavalier" attitude during the walk-out.

"If I had not filed the amicus (motion) with the court, the strike would still be on," Barry declared at a press conference. "My move got them back to work."

The striking teachers returned to their classrooms on Thursday morning, a day after D.C. Superior Court Judge Cladys Kessler met a key union demand and extended the union's old contract with the school board until July 15. The judge acted following a motion by Barry to extend the pact until mid-September.

Barry said his court motion "didn't compromise the union's position and we didn't compromise the board's position."

However, both union and school board leaders have described the court order as a union victory because the board has tried to make major changes in the contract, which it says gives the union too much power over school policy.

After the mayor's remarks yesterday, school board member Alaire B. Rieffel declared, "Barry is about as neutral as (union president) Bill Simons."

Board President Minnie S. Woodson repeated her charge that Barry had interfered improperly in the dispute.

At the news conference, Barry declared, "I'm going to intervene in and interfere with any situation in this city that threatens the public welfare of this city . . . With or without the authority. I'm gonna do it. The public expects that, I expect them (the board and others) to be mad at me. This is not a popularity contest."

Asked about Barry's comment, Woodson noted that Barry had attended a union victory party Thursday night and was cheered by members.

After a closed two-hour meeting yesterday, Woodson said the school board still had not decided whether to appeal Kessler's order even though she said some members feel the judge exceeded her authority.

Woodson said the board probably would meet again Monday.

Meanwhile, Superintendent Vincent Reed reported that 93 percent of the city's more than 6,000 teachers reported to work yesterday.

"That's better than a regular Friday," Reed said. He said 63 percent of the city's 113,000 students were in class, up from 50 percent on Thursday, but still far fewer than normal.

Reed said he expected student attendance to return to normal-about 87 percent in school-on Monday.

Yesterday, the teachers union named Marvin Friedman, an economist who has served as a consultant to many labor groups as its representative on a court-ordered fact-finding panel that will make recommendations on all unresolved issues in the contract dispute.

The school board's representative on the group is Stephanie S. Cabaniss, executive assistant to Superintendent Reed.

Both Friedman and Cabaniss indicated they are now trying to agree on a neutral chairman.

Under Judge Kessler's order the three-member panel must make its nonbinding recommendations by June 15. Kessler said she expects the report to serve as the basis for a new round of contract negotiations this summner.