WASHINGTON — Representative Charles B. Rangel and his campaign have agreed to pay a civil fine of $23,000 stemming from his use of a rent-stabilized apartment as a campaign office, according to Federal Election Commission records.

The commission’s general counsel found that Mr. Rangel, a Democrat from Harlem who has been in office since 1971, and his campaign effectively accepted campaign contributions beyond the legal limit when he leased the rent-stabilized apartment at a price below market rate from the owner, according to the documents.

The case grew out of a 2008 report in The New York Times that showed Mr. Rangel was able to lease four rent-stabilized apartments in the Lenox Terrace luxury apartment complex in Harlem even as tenants across New York City were being evicted from such apartments.

Mr. Rangel lived in three adjacent units on the 16th floor overlooking Upper Manhattan, the Times report said. But the findings by the election commission were not related to Mr. Rangel’s use of those apartments.