The rowhouses along the Amtrak railway line are the introduction to Baltimore for many visitors. Once, perhaps, these terraces might have been home to people who worked in the city’s steel, shipping and car industries. Now many of the houses are abandoned and decaying, sagging alarmingly, boarded up, or with upstairs windows removed to reveal dark, empty rooms.

Looming above and behind them is the multistorey bulk of Johns Hopkins University’s East Baltimore campus. This is home to the institution’s medicine, public health and nursing schools, as well as the Johns Hopkins Hospital. The university is one of the world’s most prestigious (it is 17th in the Times Higher Education World University Rankings 2016‑17) and has an endowment of more than $3 billion (£2.5 billion), while the world-renowned hospital is rated as one of the best in the US.

The neighbouring vacant homes, of which Baltimore has 16,000, are symptomatic of the decline in the surrounding city’s economic health since deindustrialisation began in the 1950s. The Maryland city, just 40 miles from Washington DC, is on the fringe of what is commonly known as the Rust Belt: the chain of northeastern and Midwestern cities that were once America’s industrial powerhouse but have since been corroded by poverty and deprivation.

The rise of foreign competition and automation prompted a shift of industry and jobs away from Baltimore, accompanied by a wave of “white flight” that saw the city’s population shrink from a peak of nearly 1 million in 1950 to 620,000 today, 63 per cent of which is African American.

With Bethlehem Steel and the General Motors plant just memories, the Johns Hopkins institutions are the largest private employer in Baltimore. Indeed, they are the largest employer in the whole of Maryland, providing jobs for about 55,000 people. However, relations with the city – which is now known to many outsiders principally as the gritty location for acclaimed US television crime series The Wire – have sometimes been troubled.

Ron Daniels, president of Johns Hopkins, says there is a “surfeit of history here, in terms of Hopkins’ relationship with the city”. The bequest left by the philanthropist Johns Hopkins, whose family emancipated their slaves, and whose gifts established both university and hospital in the late 19th century, stipulated that the university “see ourselves as an institution rooted in Baltimore, worried about the poor, and there was no sense that there were racial limitations built into that mandate”, says Daniels. “In almost a century and a half of history, we have not always been as true to that ideal as we would like.”

Steven Knapp, who is now president of George Washington University, led efforts to improve university employment opportunities for local residents in his time as Hopkins provost, between 1996 and 2007. The East Baltimore area around the medical campus has “become much poorer over time, and the tensions between the neighbours and this very wealthy medical centre have intensified as a result”, Knapp says. He refers to “urban legends” that were in circulation in the local area that Hopkins researchers were “doing experiments on children, who were being kidnapped and dragged into the hospital”.

Now Hopkins has made improving life in Baltimore a core part of its mission. Aims and initiatives include economic development via a major house-building project; hard targets to increase spending with local businesses and hiring workers from deprived areas; and using the expertise of its researchers in partnership with the city to address social problems – including working with the police to develop data-driven strategies tackling gun crime. According to Hopkins’ leaders, this amounts to a civic programme that is unique in its scope and ambition.

And while Hopkins has resources beyond the reach of most institutions, the core principles in its work apply more widely and could offer inspiration to universities not just in the US, but internationally. With the political consequences of deindustrialisation now taking hold across the West in the shape of Brexit and the political rise of Donald Trump – who was propelled to the White House by voters in white sections of the Rust Belt – there has never been a more urgent moment for universities to think about how they shape the economic futures of their cities and regions, and to devise remedies to social problems.

The Origins of the Urban Crisis by New York University historian Thomas Sugrue, a Bancroft prizewinner in 1998, when it first appeared, examines Detroit as a case study of the toxic legacy left in many Rust Belt cities by a combination of deindustrialisation and racial segregation in housing. “Hospitals and universities…proved to be the only reliable source of job growth in northern cities in the wake of deindustrialisation,” Sugrue writes in the preface to the 2005 edition.

Baltimore is a prime exemplar. “It’s not surprising that as there has been significant industrial retrenchment, Hopkins’ status as an anchor institution…becomes a focal point for…the aspirations that the community has for improving the status of the city and the status of the families embedded within it,” says Daniels, who has prioritised civic engagement since he arrived in 2009.

He adds of the university’s approach: “It’s the right thing to do; but it’s the self-interested thing to do. The fact is that you’re in a community where close to you there’s so much despair…Perimeter policing, all the standard techniques, will not make us as safe as we would like to be. What will make our [university] community safe and even more successful is being part of a [wider] community that is itself safe and prosperous and healthy.”

In April 2015, Freddie Gray died a week after sustaining spinal injuries while in the custody of Baltimore police. The death of the 25-year-old African American sparked serious unrest in the city, leading to the Maryland National Guard being deployed on the streets. Daniels says that while Hopkins’ civic agenda was “well in train before this”, the unrest did “force a redoubling of effort around how we thought about our engagement with the city”.

Even before Daniels arrived, the Hopkins institutions were committed to the East Baltimore Development. This $1.8 billion project, whose partners also include the federal, state and city governments, as well as child welfare charity the Annie E. Casey Foundation, has involved demolishing houses close to the Hopkins East Baltimore campus and building what its website describes as “2,100 units of mixed income homeownership and rental housing units, 1.7 million square feet of life sciences research and office space”, along with a new public school, “fresh food stores” and a park. The $43 million Henderson-Hopkins elementary school, now open, is operated by Hopkins’ School of Education in partnership with the School of Education and Urban Studies at Morgan State University, a historically black public institution in Baltimore.

The project involved the relocation of 750 households. Although there were subsidies for those required to move, “nevertheless these things are never done without appropriate consternation and scepticism”, Daniels says. Still, he has high hopes for the community that is being created, whose residents include university employees helped to buy houses in it by $36,000 subsidies from Hopkins.

The Baltimore Sun recently wrote that while some have looked on the development as a “forced gentrification project”, this “attempt at creating an economically inclusive community” now has “momentum”.

Another element to the university’s civic engagement is HopkinsLocal, which describes itself as embodying a “firm commitment to leverage [the] economic power” of the Hopkins institutions for local benefit. Those who work on the scheme feel that what makes it unique is its commitment to hard targets.

For example, the Hopkins institutions have set out aims to “achieve 17 per cent participation in construction contracts by minority, women and disadvantaged business enterprises”, equating to $20 million in spending; and to have 40 per cent of new hires “for targeted positions” from deprived Baltimore neighbourhoods by 2018.

Such efforts led on to another Hopkins initiative, BLocal, in which 25 businesses in the Baltimore area – including sportswear manufacturer Under Armour – have made a similar commitment to hire, invest and buy locally with the goal of injecting “at least $69 million into local and minority-owned, women-owned, and disadvantaged businesses over the next three years”.

Daniels highlights that “what started off as a Hopkins local economic inclusion effort – no one mandated us to do it, we did it of our own initiative – quickly became a Baltimore initiative, and dramatically increased the amount of funding available”.

An hour’s train ride north-east of Baltimore, Philadelphia shares a similar post-war experience of deindustrialisation and depopulation, although the latter is more advanced in its upswing. Philadelphia’s population is 44 per cent African American, rising to about 75 per cent in the west of the city, around the University of Pennsylvania.

Daniels makes clear that the Hopkins strategy has been “very much inspired” by the model built at Penn, where he was formerly provost. Like Hopkins in Baltimore, Penn and its hospital comprise the largest private employer in Philadelphia.

“Where Hopkins is now, Penn was, say, in 1996,” says Anthony Sorrentino, assistant vice-president in the office of the executive vice-president at Penn.

He adds that 20 years ago “urban decay had enveloped our campus and West Philadelphia was embattled, [by] violent crime, blight, low educational attainment in the public schools, the general decay that comes with the white flight…for the country and the suburbs”.

Judith Rodin, Penn president between 1994 and 2004, began a strategy to change that: a story she tells in The University and Urban Revival: Out of the Ivory Tower and into the Streets, first published in 2007.

The book begins by recalling the killing of Vladimir Sled, a Penn biochemist stabbed to death in 1996 when he tried to stop his fiancée being mugged as they walked to their West Philadelphia apartment. The killing came amid a series of armed robberies on or near campus. Rodin writes that residents “by and large felt that Penn had turned its back on the neighbourhood” and that little of its spending of hundreds of millions of dollars a year on services and construction “trickled down to local businesses”.

“It was becoming difficult to attract students and faculty because of the perception that this was a hostile environment,” adds Jeffrey Cooper, vice-president in the office of government and community affairs.

Sorrentino details the changes that were implemented: stepping up the university’s policing; giving university staff loans to “purchase and fix up a home in the neighbourhood”; a “commercial corridor strategy” under which the university bought property to develop retail opportunities; and “workforce development” for local residents to gain jobs at the university or work as contractors for it, as carpenters or plumbers, for example.

Penn also financed the building of a new public elementary school, the Penn Alexander School, opened in 1998.

“In a very conscious and deliberate way, Penn worked to develop the neighbourhood in a way that both made it a more comfortable and welcoming place for Penn students, faculty and administrators, but also just improved the day-to-day lives of the people in the neighbourhood,” Cooper says.

While other universities were opening campuses in London or Tokyo, “Penn’s decision was that we were going to have impact right here”, says Dawn Maglicco Deitch, executive director of the institution’s office of government and community affairs.

The university holds meetings with local residents every month. These are “an opportunity for the university to talk about what’s going on, so we’re not surprising the neighbours: where we’re building, what tickets can you get for an athletics event, to a cultural event, what kind of health programmes are available for the public,” Cooper says. He adds that these meetings are also a chance for the university “to listen and hear about what [residents] need”.

University dental and veterinary clinics are open to the public. At the Pennovation Works, formerly a derelict chemicals factory rejuvenated by the university, tech start-ups are incubated and the vet school trains working dogs for use in emergency response and cancer detection.

Penn also has significant scholarly expertise in the academic study of universities as anchor institutions through its Netter Center for Community Partnerships. Sorrentino says that there are fresh challenges in the university’s work in West Philadelphia. There is now a high-quality public school in a safe area (registration day has previously seen parents “camping out the night before like it was tickets to see Adele”, says Sorrentino), pushing up house prices and altering the racial balance in the area around the school. And while whites remain the minority for now, Sorrentino predicts that that will change in future.

Hence, Penn has created a Neighbourhood Preservation and Development Fund to buy apartment buildings and rent out the flats for lowered rents to predominantly African American tenants. The aim, according to Sorrentino, is be “pushing back against” gentrification.

In Baltimore, Daniels says that Hopkins’ approach is “broadening out [beyond] real estate development and community development” into how “we can use our intellectual resources to impact the city”. One notable example – launched by Hopkins and the Baltimore Police Department in 2016 at a press conference attended by both Daniels and the city’s police commissioner, Kevin Davis – is what Hopkins describes as “a joint effort to apply data and research to policing in hopes of reducing violent crime”.

Daniel Webster, director of the Johns Hopkins Center for Gun Policy and Research, is co-director of the project. He says that the researchers aim not just to provide “more effective strategies, data-driven strategies, to reduce violence”, but also to achieve that by bringing “whatever help we can to improve relationships” with the communities being policed.

The researchers will help to guide – and ultimately evaluate the success of – five schemes initiated by the police, along with another suggested by the Hopkins team, according to the project’s deputy director, Cassandra Crifasi, assistant professor of health policy and management at Hopkins. One initiative is the “war room” created by Davis (“we’re not big fans of the name”, says Crifasi). This is an operational intelligence unit that identifies “the most dangerous individuals in the city” and aims to “get them off the streets, not just with arrests but with good [legal] cases and successful prosecutions”, she says.

Meanwhile, the researcher-initiated project will be based around “deterring illegal gun carrying and use”, she continues. Webster says that while police approaches can often be “individual-focused”, his sense is that “deterrence is really where it’s at with respect to getting population-wide behaviour change that translates into less violence”.

He adds that in the police’s use of crime figures, “everything is based on a year-to-date comparison, and this is what drives me crazy”. The Hopkins researchers can use longer-term statistical models of trends in crime figures, including by geographical location across the city, to show the police “whether there are correlations between what they are doing and outcomes”, he says.

Another Hopkins-city collaboration came about after a conversation between Daniels and Baltimore’s health commissioner, Leana Wen, during which Daniels asked what one thing Hopkins could do to most improve school education in Baltimore. “Without missing a beat, she said, ‘Glasses,’” recalls Daniels.

Although children are screened for vision problems at school, the problems identified might not be addressed if the school’s note fails to make it home, or if parents fail to book the follow-up appointment. Not being able to see the board in class hugely damages such children’s educational prospects.

Now Hopkins is one of the partners – alongside Baltimore’s schools system, its health department and the non-profit organisation Vision to Learn – in a three-year programme to ensure that every child across the city’s 153 public schools has access to glasses.

The aim is to switch into schools the entire system, from eye examinations to the pick-up of glasses, says Josh Sharfstein, associate dean of public health practice and training at Hopkins’ Bloomberg School of Public Health, and a former health secretary for the state of Maryland. The project will be using Hopkins’ research expertise “to guide best possible implementation and to evaluate [the project’s] impact over time – on test scores and school attendance”, he says.

Hopkins has also begun an attempt to foster collaborations between university researchers and city governments nationwide, known as the 21st Century Cities Initiative. Kathryn Edin, Bloomberg professor in Hopkins’ department of sociology and a specialist in the study of urban poverty, is its director. A recent symposium hosted by the initiative was attended by officials from 30 cities across the US, including 14 mayors, as well as researchers from 20 universities.

The goal is to promote a “new brand of research that’s deeply engaged with cities and really done in conversation with city partners,” Edin says.

She cites a recent visit to Hopkins by officials from Baltimore’s departments of planning and health. Researchers gained information about city data sources that they did not know existed; city officials learned about the causes of home abandonment. In their studies, the Hopkins researchers have found that the biggest clusters of abandoned houses in East Baltimore are “gift houses” that grandparents or parents give to close family in need of a place to live, says Edin. But those most in need can struggle to deal with the practicalities of maintaining a household, and may abandon their attempts as the unpaid tax liabilities against it mount up. Now, a Hopkins physicist is developing a statistical model to predict where vacant homes will occur: potentially a valuable resource for the city.

Edin’s most recent work is as a co-author of the book Coming of Age in the Other America, which charts the life courses over the past two decades of a group of children raised in Baltimore public housing. The essential message from her research, she says, would be that Baltimore should continue to use housing policy to “ensure that we don’t just reproduce patterns of racial and economic segregation” in the make-up of neighbourhoods.

According to Penn’s Sorrentino, the benefits of a university that truly engages with its local community are indisputable in the context of deindustrialisation. “We are anchored in place…Perhaps as long as there is demand for our hospitals and our universities, we could set up something that’s more stable than even a factory, whose jobs come and go.” However, the nature of Hopkins and Penn – highly selective private institutions predominantly white in their student bodies, faculty and leadership – will raise questions from some about their ability to truly transform their majority-black neighbourhoods. Daniels acknowledges the problem, noting that “if we’re not seen to be a place where African Americans can ascend to leadership positions in the administration, or [if] our faculty is not as representative [of the local community] as we would like, then that can’t help but dull [our] capacity to be regarded as a beacon institution”.

But the combined weight and diversity of the Baltimore area’s six public four-year colleges and universities, and its six private institutions, offers a basis for optimism.

“Baltimore is one of America’s college towns,” says Freeman Hrabowski, president of public research institution the University of Maryland Baltimore County, noting that the area is home to about 200,000 degree students. Hrabowski, chosen by Barack Obama to chair the President’s Advisory Commission on Educational Excellence for African Americans, says that UMBC’s “signature” outreach initiative is its Choice Programme. This trains AmeriCorps graduate volunteers to offer intensive personal support to teenagers, “typically boys of colour”, who have come into contact with the criminal justice system, he says.

Are universities stepping into the role of government here? “That’s not what we’re here to do,” says Daniels. “To my mind you can’t do this successfully without government,” he adds.

And when it comes to local government, what Edin says of the ethos behind Hopkins’ 21st Century Cities Initiative might apply to university research generally: “Cities don’t have the time or money to invest in very much research…Can we use science to help them deploy their resources in more meaningful ways?”

Different kinds of institutions must tailor different approaches to their cities and regions. But there are some core principles that apply for universities around the world, Daniels feels.

Universities “are major repositories of intellectual and moral capital”, he says. “Whether through our ideas, our hiring practices, our contracting or our economic development activities, we have the power to positively influence our communities.” And doing so also benefits universities’ research, Daniels believes, because “ideas get better when they have to actually be tested: applied to real problems”.

As cities continue to grapple with inequality and the legacy of deindustrialisation, and as the rise of new automation and artificial intelligence threatens to take more jobs away, there will surely be no shortage of such “real problems”, to which the economic and research power of universities can be applied.