The House of Representatives approved a record-high $361 million federal payment to the District of Columbia yesterday, but for the first time told the city in advance how it must spend some of those funds.

The House, responding to a fierce lobbying effort by local police and firefighter groups, ordered the city to use $14.3 million of the federal payment to shore up its pension fund for retired teachers, firefighters and police.

This action marked the first time Congress has imposed restrictions at this stage of the budget process on the way the city may use the federal funds it receives as compensation for taxes it loses and extra costs it incurs as the home to the federal government.

District officials and members of Congress who have championed the city's right to self-government immediately branded the action as a swipe at the city's home-rule powers. "It is an unnecessary intervention by Congress into the budgetary process of the city," said City Council Chairman Arrington Dixon. "It was a very heavy-handed action."

The House action could seriously disrupt the city's plans for spending the additional $24.4 million contained in the fiscal 1983 federal payment, according to District budget director Gladys Mack. That plan called for using $15 million for additional Medicare payments, $5 million to cover previously approved city salary increases and $4.3 million for the pension fund.

However, Mayor Marion Barry said he felt certain the restriction would be lifted when a House-Senate conference committee meets to reconcile differences between the Senate and House versions of the bill. The Senate placed no restrictions on how the funds could be spent. "The important thing is that both the Senate and House passed the highest federal payment for the District and we shouldn't lose sight of that," Barry said.

The House approved the record federal payment by a 279-to-122 vote. That came minutes after members of Congress voted 221 to 181 in favor of the restrictive amendment offered by Rep. Stanford Parris (R-Va.), whose Northern Virginia district is home to a large number of D.C. firefighters and police.

Parris has frequently clashed with city officials on issues involving those groups. Last year he intervened in about a half-dozen D.C. proposals, some of them in the budget process.

The city and Congress often have fought over particular items in the D.C. budget, which Congress must approve, but in the past those battles have come after the District has placed its spending plan before Congress. Never before have legislators tacked a spending mandate onto their initial approval of the federal payment, which is part of the city's revenue base.

Rep. Ronald Dellums (D-Calif.), who as chairman of the District Committee led the floor fight against Parris' amendment, said he was concerned that "once you open the door" to such restrictions, many more could follow. "And each time there is an encroachment, D.C. residents suffer," he said.

D.C. Del. Walter Fauntroy said that the firefighters and police, whose representatives lobbied for the amendment all week, violated the "one principle we've asked local citizens to follow -- to make their case with the local government and not . . . by going to Congress."

But Gary Hankins, of the Fraternal Order of Police's local labor committee, said his group turned to Congress only after getting no satisfaction from the mayor's office. And Frank Higgins, chairman of the D.C. employe retirement board, asserted yesterday that he spoke with Parris about the issue after trying for a year to get compensation from the city for a 1981 pension fund cash shortage.

Barry and other members of his administration vehemently disputed Higgins' assertions.

The pension fund's short-term problems, according to Higgins, can be traced to discrepancies in the past few years between the projections of what the fund would have to pay out and the actual payments ultimately made to retirees. Last year, the board was forced to withdraw $14.3 million from its long-term investments to cover a cash shortage caused by this underestimation. Last month the board voted to take another $6.8 million from that fund for the same purpose.

Parris, arguing for his amendment yesterday, asserted that under the law setting up the pension program, the D.C. government was required to make up those cash shortages with payments to the fund. Higgins said that the Barry administration has failed to offer the board a concrete payment plan for the 1981 shortages.

But Barry and other city officials said the city has promised to pay the fund $4.3 million for the next three years to compensate for what the city estimates is a $12.9 million shortage. In doing so, Barry said, the city has gone beyond the requirements of the law.

Washington Post staff writer Eric Pianin contributed to this report.