ANNAPOLIS, SEPT. 9 -- The State of Maryland is expected to have some extra money to spend next year on building projects.

State Comptroller Louis L. Goldstein announced this week that, primarily as a result of federal tax revision, the state government in the 1987 fiscal year closed its books with a $176.5 million surplus. Gov. William Donald Schaefer said he intended to use some of the money for such capital projects as roads and mental hospitals.

In addition, an oversight panel on the state debt recommended today that the state increase its ceiling on new borrowing for capital projects in 1988. The panel, headed by state Treasurer Lucille Maurer, recommended that the limit be set at $270 million -- $40 million more than the limit for this fiscal year.

The panel, the Capital Debt Affordability Committee, found that current highly restrictive guidelines on capital construction spending are outmoded. Those guidelines were established to retire the large state debt built up during the 1970s, when the state was spending heavily on new school construction.

In past years, the committee's recommendations have been strictly followed by the governor and the General Assembly.

The committee also recommended limited use of novel financing methods favored by Schaefer. The panel recommended that any so-called lease-leaseback arrangements for building state facilities be limited to $15 million a year and, like other capital projects, be subject to approval by the legislature.

Under a lease-leaseback arrangement, a developer would lease land from the state, then build and retain ownership of a project and lease it back to the state. The state would have the option of buying the building at the end of the lease.

Schaefer ran into legislative opposition to this so-called creative financing this summer, when he tried to use a lease-leaseback arrangement to build a $16 million state office building and court complex in Salisbury without General Assembly approval. The Salisbury project was to have been the first of nine lease-leaseback projects planned around the state.

Schaefer said today that he was pleased with the recommendations on increasing capital spending. Many state facilities, he said, "are in very, very serious condition."

A spokeswoman for the governor said Schaefer wants to use some of the 1987 budget surplus, expected to be a one-time windfall, for capital projects as well.

Many legislators, anticipating the surplus, have said they would like to see a big chunk placed in reserve for use in resolving the state's lingering savings and loan problems.

Goldstein said that the surplus was primarily the result of the sale of property and stocks from people trying to avoid higher capital gains taxes under the new federal tax law. In addition, he said, revenue generated by retail sales and property transfers was higher than expected, and the state recovered $27 million in a court case stemming from the 1985 savings and loan crisis.