The Securities and Exchange Commission, which polices corporate accounting, improperly excluded from its accounting hundreds of millions of dollars of rent obligations associated with a botched office lease, according to the Government Accountability Office.

Although the SEC estimated that its total obligation under the 10-year lease would be at least $371.7 million, it recorded only $180,000 of that up front, the GAO said in a ruling posted Wednesday.

“SEC should have recorded its total obligation for the duration of the lease at the time it signed the lease agreement,” the decision by GAO general counsel Lynn H. Gibsonsaid. The agency “had no authority to record an obligation for an amount less than its full liability under this contract.”

The GAO decision involves a lease the SEC signed last year for office space in downtown Washington. At the time, Congress had just increased the agency’s responsibilities, and the SEC planned to expand its workforce. But Congress did not deliver the budget increase the agency was counting on, and the SEC determined that it did not need and could not afford the space.

Other government agencies have agreed to use most of the space, but the SEC is still looking for tenants to fill the rest.

The SEC’s chief financial officer asked the GAO to address the accounting for the contract.

According to the GAO decision, the SEC argued that it was permitted to enter multiyear leases without booking the government’s total obligation up front.

Rejecting that argument, the GAO told the SEC to “adjust its accounts accordingly.” The GAO said the SEC was bound by a federal law called the Antideficiency Act, which requires federal agencies to live within their budgets.

The SEC should have booked its total lease liability in an internal system meant to control and keep track of the agency’s funds, said Thomas H. Armstrong, managing associate general counsel at the GAO.

“You can’t wait until you get the bill to go find the money to pay the bill,” Armstrong said.

In a letter Tuesday to the GAO, Mark D. Cahn, the SEC’s general counsel, said the agency respects the GAO’s interpretation of the law.