Anne Arundel County opened the doors to its new circuit court building last week, ending a five-year, $62 million effort to shoehorn a massive modern courthouse inconspicuously into the quaintly cramped confines of downtown Annapolis.

The building is a blend of old and new. The 1824 courthouse has been restored and serves as an entryway to a new airy, glassed-in complex with more than six acres of floor space and the latest in judicial technology. An official opening will be celebrated in the spring, but employees have started moving into the last-completed new segment of the complex.

"It reflects the best of old Annapolis, and it also looks to the future," said Circuit Court Clerk Robert P. Duckworth.

Yet the building also reflects the tough choices facing public agencies as new technology and changing needs cause them to outgrow their old settings. Across the region, many agencies have abandoned county-seat downtowns in favor of outlying commercial strips and office parks, where space is more plentiful. Howard County long ago moved many of its offices from tiny Ellicott City to fast-growing Columbia; Prince George's County offers its health services in Largo and bases its police in Landover, both far from Upper Marlboro.

But city officials in Annapolis--which had long since lost many of its county and state offices--lobbied hard to keep the county's circuit courthouse, which they considered key to their downtown's vitality.

Court officials estimate that their decision to stay has doubled the construction time, because they had to build in two phases while the court continued to operate. It also reignited long-standing complaints about the scarcity of parking in downtown Annapolis. Some court officials are now urging the city to buy the nearby hospital garage that is slated for demolition when Anne Arundel Medical Center moves to the outskirts of town.

Moving to the suburbs "would have saved us a lot of money," said Court Administrator Robert G. Wallace.

"But then we wouldn't have been in downtown Annapolis," he added.

Few would disagree that Anne Arundel County was in dire need of a new courthouse. The rambling old building--consisting of the 1824 section, which faces historic Church Circle, and a 76,000-square-foot addition built in 1952--was desperately crowded.

Last year, the number of new cases grew to more than 20,000, up from fewer than 16,000 a decade earlier. The court clerks had office space on the ground floor, but the records they monitored were consigned to basement storerooms. Potential jurors had no place to wait before selection except the hallways, where they often had clear views of shackled suspects on their way in. Courtrooms were so small that jurors could practically reach out and touch the lawyers' tables.

In the early 1990s, officials planned to build their new courthouse across the street from the county building on the fringe of historic Annapolis. But it quickly became apparent that the available space was too small, and a new county administration set its sights outside the city, on the Parole shopping district, among other areas.

That's when the city got involved. Annapolis's mayor at the time, Alfred A. Hopkins, argued that dozens of downtown businesses relied on the patronage of courthouse employees and the 4,000 visitors who pass through its doors each week.

Then-County Executive Robert R. Neall (R) agreed and resolved to keep the courthouse at its original site. Yet the decision nearly doubled the cost of the new building.

Wallace estimates that construction cost about $31 million and says the $62 million total includes two design proposals that were tossed out; dozens of meetings with the city's historic district commission, which the architects had to attend; and the complicated relocations and temporary renovations necessary to accommodate court services after their old quarters in the 1952 wing were torn down.

The result is more than 270,000 square feet of space, about three times the size of the old building. It offers 14 jury courtrooms, as opposed to eight in the old building, to keep up with growing caseloads.

And most of the courtrooms are significantly larger--1,500 square feet, up from 900 square feet in the old building. Today's courtrooms are fully wired: Attorneys are provided with computers that enable them to make their case using PowerPoint software to create displays on an overhead screen; the witness boxes have monitors that allow witnesses to point out items on the overhead with electronic markers; the judges have online access to legal texts.

The rooms also are built larger to comply with new federal disability access regulations: Witness boxes are level with the floor, and the jury boxes have wide entry gates and removable seats to accommodate wheelchairs. There are even hydraulic lifts to the judges' benches.

Yet for all its sprawling space, the new building is carefully camouflaged so that its bulk is barely visible from the Church Circle entrance. Most of it is tucked into a sloping hill, so that its highest point is still lower than surrounding buildings.

Wallace said it was crucial that the building not overwhelm its surroundings. "This is a historic city. We were very aware of what we were doing," he said.

"It's the first time in 175 years we've built a courthouse, and it will probably be 175 years until we do it again."