WORCESTER — One of the most expensive public construction projects in the state’s history, set to open Thursday, looks in some ways like a sprawling deluxe residential complex. Bedroom windows face landscaped greenery, modern light fixtures illuminate wide corridors, and recreation rooms feature new treadmills and pool tables.

Yet within this $302 million structure, there is clearly a sober­ness of purpose. The ceiling light fixtures lack any parts that could be used to help residents hang themselves. The lights’ on-off switches are partly covered to avoid deliberate electrocution. The walls are made of a high-impact material to ­absorb fist-pounding and kicking.

This is the Worcester Recovery Center and Hospital, a state-of-the-art facility designed to care for the most severely mentally ill patients who are not yet ready to be treated in a community setting, the longtime trend in psychiatric care.

The 320-bed hospital will take in the patients displaced from a Worcester facility that is being closed and a partially shuttered Taunton hospital. The new complex will treat nearly half of 670 psychiatric patients across the state needing long-term hospitalization. In the mid-1950s, the state’s network of about a dozen psychiatric hospitals housed nearly 23,000 patients.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

The complex, with its private rooms and its airy communal spaces, represents a stark departure from state mental hospitals of old, where patients fought delusions and depressions in locked wards, with little focus on privacy and choice.

While state authorities ­remain deeply committed to the concept of community-based care, they said they had to construct a more modern structure in line with current therapeutic practices for those who cannot yet live safely in the general population. Many of the patients who will be treated there have been diagnosed with schizophrenia, severe bipolar disorder, and other profound mental conditions.

The layout of the new facility signals that each patient’s goal should be a readiness to return to the community, hopefully permanently. Adult patients each have their own private room and bathroom. From there, they can enter “suites,” “houses,” “neighborhoods,” and a “downtown” with a gift shop, cafe, hair salon, bank, chapel, gym, and recreation rooms.

The hospital becomes a way for patients, who typically need to stay about six months, to ­rehearse their eventual return to regular life, state mental health officials said.

Frank Pitts, a Troy, N.Y., ­architect who specializes in design­ing psychiatric spaces, said his work on the four-story structure, which spans 428,000 square feet, addresses a central question that has plagued clinicians working with emotionally volatile patients who have to coexist for months at a time. “How do you design a place where people who are not related are going to live and heal ­together?” said Pitts.

Four years of planning and three years of construction led to this week’s opening, which was made possible by a $302 million bond, the largest non-transportation building expenditure ever in Massachusetts, state officials said. State officials also had to contend with criticism from some lawmakers who said that the state has been too aggressive in closing existing, aging facilities, leaving some regions without a state hospital and the state without enough total beds.

Two years ago, Westborough State Hospital, built in the 1880’s, was closed. Governor Deval Patrick tried this year to close the 158-year-old Taunton State Hospital, but faced strong resistance from lawmakers who succeeded in keeping 45 beds, about one-fourth of its total, open for at least one year. Other mental health beds are located in state facilities in Boston and Tewksbury.

Though the new hospital was expensive to build and will be costly to operate, at $60 million a year, state officials insist it will reap financial benefits down the road, based on their conviction that patients, having received the premium care available at the new Worcester hospital, will require less hospitalization over the long run.

“With a greater focus on ­individualized care and recovery, the facility better transitions patients to receive care in community settings, which for many means better quality care at lower cost,” Patrick said in a statement. He will preside over a ceremony Thursday, at which he will plant a Japanese flowering cherry tree in the hospital’s “village green.”

Marcia Fowler, commissioner of the Department of Mental Health, which worked with the Division of Capital Asset Management on the project, said the ability of all patients to have single rooms recognizes the impor­tance of privacy among this population as they try to ­recover. Many of these patients, she said, have experienced ­repeated trauma, including sexual assault.“Some of our ­patients are afraid of each ­other,” she said.

The architect, Pitts, said there is a therapeutic purpose behind the fact that all bedrooms are on one side of a corridor; the other side is lined by small sitting areas. Patients can look out and decide whether they are ready to step out and socialize or return to privacy of their room.

“It’s not about being alone; it’s about control,” said Pitts, who worked with the Cambridge-­based architectural firm Ellenzweig Associates, in designing the hospital.

Pitts said he is not aware of long-term studies that have conclusively linked these designs to improved patient outcomes, but said his blueprints are influenced by advice from psychiatrists, neuroscientists, nurses, researchers, and families, among others, who have explained what spaces work well for the mentally ill.

Among the new hospital’s 320 beds, 60 are devoted to a separate adolescent wing.

For many advocates of the mentally ill, the opening is a cause for celebration, though they recognize challenges lie ahead. Many of the 300 ­patients who will gradually move in from other state hospitals are easily agitated when having to change routines and relocate. The 1,200 staff members, most of whom are used to working in the older hospitals, will also have to learn new protocols and security measures.

Still, Phil Hadley, former president of the Massachusetts board of the National Alliance on Mental Illness and part of a committee formed seven years ago to discuss a new psychiatric hospital, said the facility is a radical departure from the past.

“There were six to a room, and you have to walk down the hall to the shower,” said Hadley, a Gloucester resident who had a child hospitalized for severe mental illness. The new hospital in Worcester, he said, is “a real recovery center.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.